[maemo-developers] python Re: [maemo-developers] Maemo 2.0 final release available

From: Gustavo Sverzut Barbieri barbieri at gmail.com
Date: Mon Jul 10 17:20:49 EEST 2006
On 7/10/06, Tommi Komulainen <tommi.komulainen at nokia.com> wrote:
> On Mon, 2006-07-10 at 09:29 -0300, ext Gustavo Sverzut Barbieri wrote:
> > On 7/10/06, Frantisek Dufka <dufkaf at seznam.cz> wrote:
> > > As for the horrible startup time even applications written in C start
> > > slowly but python is really much worse. Yesterday I tried the runtime in
> > > 2.0 repository with simple examples copied from
> > > http://www.maemo.org/platform/docs/pymaemo/python_maemo_howto.html and
> > > it is not very usable in current state. Those simple hello world apps
> > > start  approx. 4 seconds for the first time when python is not in file
> > > cache and approx. 2 seconds for second time. This is too much to be
> > > usable IMHO.
>
> Oh, it's only 4 seconds. I was under the impression it would be closer
> to 10. It's not *that* bad then :)
>
>
> > When you do write code in C, it will evaluate gtk_$CLASS_type() just
> > for used classes. But for PyGTK, it used to evaluate this for _EVERY_
> > class available, doing a lot of branches, function calls, memory
> > allocation, ... This seems to be fixed in PyGTK CVS with "lazy
> > evaluation" patch.
>
> Ouch! Another contributing factor is probably the number of local
> symbols in _gtk.so that need to be relocated.

sure.


> > So far there is no optimization of this kind.
> > I do plan to write a pythonserver, in the same fashion as wineserver
> > or kdeinit. A process that would link to _gtk.so and _hildon.so, when
> > you use python (in client form) it would just call the server and it
> > will fork() (sure, doing the right thing for stdin/stdout). However
> > this is not done at the moment.
>
> We have maemo-launcher :)
> https://stage.maemo.org/svn/maemo/projects/haf/trunk/maemo-launcher/
>

I'll try


> Or, assuming that 95% of the time python on 770 would be used for GUI
> applications (rather than daemons, scripts or such) linking pygtk and
> pyhildon statically with python might be wortwhile optimization.
> Licenses permitting, of course.

That's my idea and it's in my TODO :-)


-- 
Gustavo Sverzut Barbieri
--------------------------------------
Jabber: barbieri at gmail.com
   MSN: barbieri at gmail.com
  ICQ#: 17249123
 Skype: gsbarbieri
Mobile: +55 (81) 9927 0010
 Phone:  +1 (347) 624 6296; 08122692 at sip.stanaphone.com
   GPG: 0xB640E1A2 @ wwwkeys.pgp.net

More information about the maemo-developers mailing list