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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>:
> >
> > 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
> > [EMAIL PROTECTED]
> > _______________________________________________
> > maemo-developers mailing list
> > [email protected]
> > https://lists.maemo.org/mailman/listinfo/maemo-developers
> >
> >
>
> _______________________________________________
> maemo-developers mailing list
> [email protected]
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
>


-- 
Jesse Guardiani
Software Developer / Sys Admin
[EMAIL PROTECTED]
_______________________________________________
maemo-developers mailing list
[email protected]
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to