How to check Matplotlib's speed in Xcode and increase performance? -


i'm running considerable speed bottlenecks python-matplotlib-xcode combination. know immediate responses ask "why doing python stuff in xcode, man , use vim" --> organizing ability , built in version control, makes elements of work easier deal with.

getting python run in xcode in first place bit more tricky had hoped, possible. have following scenario:

a master file, 'main.py' import stuff me , sets universal formatting make figures (for eventual inclusion in phd thesis) nice , uniform. afterwards runs series of execfile commands generate whichever graphics need. 2 things can think of right off bat:

1) @ beginning of main.py after import normal python stuff tend need, call system script checks whether filesystem mounted. keep climate model data on there since local hard drive small deal of @ once. python pauses , waits system thing, once filesystem has been found, keeps going. needs happen once in morning when work, or if vpn server kicked me off whatever reason. (side question, it'd cool know if theres trick automate vpn login reconnect notices not connected)

2) i'm not sure how xcode using on own. running same program terminal (somewhat) faster. i've tried memory conscience , turn off stuff don't need while running python/xcode combination.

also, python launches little window whenever call plt.show(), in takes time, i've considered saving them quick png files , opening them other viewer, although guess have somehow take time open up. given how these graphics change add model runs or think of nicer ways of displaying data, it'd nice not waste on order of 15 30 minutes (possibly more) out of entire day twiddling thumbs , waiting window pop up.

benchmark it!

import datetime start = datetime.datetime.now() # plotting code td = datetime.datetime.now() - start print td.total_seconds() # requires python version >= 2.7 

run in xcode , command line, see difference is.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -