[maemo-developers] python startup time
From: luciano.wolf at indt.org.br luciano.wolf at indt.org.brDate: Fri Nov 16 20:34:05 EET 2007
- Previous message: python startup time
- Next message: rtcomm source ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Jesse, Python-launcher is in the roadmap, as I've said in PyMaemo's release email. I'm planing to have a test version next week. Regards, Luciano -----Original Message----- From: maemo-developers-bounces at maemo.org on behalf of ext Jesse Guardiani Sent: Fri 16-Nov-07 13:30 To: Maemo Developers Subject: Re: python startup time See this from the OLPC project: http://blogs.gnome.org/johan/2007/01/18/introducing-python-launcher/ python-launcher is a daemon that caches GTK imports. kinda like mod_python for GTK. Maybe we should add this to maemo and give it a control panel applet or something? It would make GTK Python apps usable from a startup time perspective. On 11/10/07, Martin Grimme <martin.grimme at gmail.com> wrote: > > Hi, > > if you are importing lots of modules, you can get the startup time down by > not importing the modules at the top of a file, but at the place where you > need it in a function. > Note that modules are loaded only once, so subsequent import commands will > have no effect. > > Example: > instead of this: > > import os > > def foo(): > print os.listdir() > > > you can write this: > > def foo(): > import os > print os.listdir() > > > Cheers, > Martin > > > 2007/11/9, Jesse Guardiani <jesse at guardiani.us>: > > > > Hello, > > > > Is there anything that can be done about python startup time? > > I recently wrote a very simple little pygtk + glade application that is > > less than 110 lines of code and it takes between 5 and 9 seconds to start > > up. > > http://www.guardiani.us/projects/tip_calc/browser/trunk/src/tip_calc/tip_calc.py > > > > Any way to get that startup time down? > > > > > > -- > > Jesse Guardiani > > Software Developer / Sys Admin > > jesse at guardiani.us > > _______________________________________________ > > maemo-developers mailing list > > maemo-developers at maemo.org > > https://lists.maemo.org/mailman/listinfo/maemo-developers > > > > > > _______________________________________________ > maemo-developers mailing list > maemo-developers at maemo.org > https://lists.maemo.org/mailman/listinfo/maemo-developers > > -- Jesse Guardiani Software Developer / Sys Admin jesse at guardiani.us -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.maemo.org/pipermail/maemo-developers/attachments/20071116/e165957c/attachment.htm
- Previous message: python startup time
- Next message: rtcomm source ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]