|
#1
|
||||
|
||||
|
Hi,
looking for suggestions/ideas/code/methods for making python faster! in #maemo irc, x-fade remembered about a pylauncher project, but does not know of its active status in fremantle: http://pylauncher.garage.maemo.org/ what other things can we do to effectively speed up python simple things, suggestions metrics etc does removing the comments make a noticable difference to script runtime? mini ad-hoc brainstorming session.. ================================================== ==== Update, added wiki page results A couple of weeks later and after much discussion and testing we have a fairly decent set of guidelines and best practices \o/ Performance_Considerations_for_Python_Apps thanks to epage for the excellent wiki writeup
__________________
liqbase sketching the future. like what i say? hit the Thanks, thanks! twitter.com/lcuk Last edited by lcuk; 2010-05-20 at 14:20. |
| The Following 11 Users Say Thank You to lcuk For This Useful Post: | ||
attila77, CrashandDie, frals, Helmuth, mbo, MohammadAG, noobmonkey, RFS-81, sjgadsby, Texrat, X-Fade | ||
|
#2
|
||||
|
||||
|
__________________
Technically, there are three determinate states the cat could be in: Alive, Dead, and Bloody Furious. |
|
#3
|
|||
|
|||
|
I'm not a developer so not 100% sure, but this thread is somewhat similar/hopefully helpful.
http://talk.maemo.org/showthread.php?t=47850 Edit: just noticed that the other thread is only for improving the inital startup times and not in general. My bad Last edited by un-named_user; 2010-04-22 at 11:13. |
|
#4
|
||||
|
||||
|
Quote:
__________________
liqbase sketching the future. like what i say? hit the Thanks, thanks! twitter.com/lcuk |
| The Following User Says Thank You to lcuk For This Useful Post: | ||
|
#5
|
||||
|
||||
|
Interesting post....... I feel i may be able to provide a few tests to back up issues....
Healthcheck currently has about 300 redundant lines of code (Comments + Blank lines) probably 25% of the total. I'll run a version of it without all of those and compare load times
__________________
----------- Follow me on Twitter here ----------- My Photography Website and Blog is here ----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10) ----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun ----------- What apps do you want to see on the n900 or in MeeGo in the future? - |
| The Following 4 Users Say Thank You to noobmonkey For This Useful Post: | ||
|
#6
|
|||
|
|||
|
@lcuk
My damn N900 ate the smiley for some reason & made me look like a sad panda ![]() Anyways good to see the overall scheme includes start up improvements too. |
|
#7
|
||||
|
||||
|
The import method of not importing everything has some postive impacts, though probably small.
- reduce startup time - reduces code size as your code no longer has to refer to the base class. ie qtcore.qrectangle becomes just qrectangle - not sure if references become a bit faster internally, but feels right to me. I would also use constants where possible rather than have them values recalculated, as is often the case in code. given most heavy lifting code is done inside the libraries like qt I,m not sure python is much slower, and if you ae not using libraries why not especially given the richness of them. of course YMMV
__________________
N900_Email_Options Wiki Page |
|
#8
|
||||
|
||||
|
from irc:
Quote:
__________________
liqbase sketching the future. like what i say? hit the Thanks, thanks! twitter.com/lcuk |
| The Following User Says Thank You to lcuk For This Useful Post: | ||
|
#9
|
|||
|
|||
|
When we talk about making Python "faster" do we mean:
(a) perceptionally faster (e.g. time to reach first screen) (b) execution speed
__________________
I like cake. |
|
#10
|
|||
|
|||
|
Quote:
Also, for tricks using preloaders: Please consider what that does to memory - keeping GTK and/or QT bindings in there is quite a burden, think it through before you commit to such a thing.
__________________
Blogging about mobile linux - The Penguin Moves! Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc |
![]() |
| Tags |
| performance, python |
|
|