wxPython performance

Andrei Kulakov ak at silmarill.org
Sat Jun 1 23:16:40 EDT 2002


In article <3cf94ca7$0$31235$e4fe514c at dreader1.news.xs4all.nl>,
    Boudewijn Rempt wrote:
> Peter Hansen wrote:
>> 
>> Other options might include making sure modules are not loaded
>> until they are needed, or loading them on a separate thread just
>> after the main program starts.
>> 
> 
> Convincing your users that they need to preload the libs might
> work too -- for instance by creating a 'server' component that
> should be started when the machine is booted that loads the lib.
> 
>> None of which seems to help the OP.  I'm curious why the Linux
>> implementation is so much slower than the Win32.  My own machine
>> is _not_ fast!  (It's only a 233 MHz Pentium MMX.)
>> 
> 
> wxPython has to load gtk, probably, and the bindings. The underlying
> gui library is already present in memory on a windows machine, leaving
> only the bindings to be loaded.
>
gtk-gnutella starts in 0.5 seconds on this system. I timed the
program I posted about, it takes 5.6s on first invocation, 4.7
and 4.6 on 2 subsequent ones.

> 
> I've also noticed that Python loads its own bytecode files rather
> more slowly than other files. So any pixmaps shouldn't be put in the
> code, but loaded separately. That can make quite a difference.
> 


-- 
Cymbaline: intelligent learning mp3 player - python, linux, console.
get it at: cy.silmarill.org



More information about the Python-list mailing list