Re: Gnome 2.14 Module Proposal: Deskbar Applet

Ter, 2005-10-25 às 14:39 +0100, Mike Hearn escreveu:
> On Tue, 25 Oct 2005 11:25:40 +0800, Davyd Madeley wrote:
> > I don't think it is unacceptably high however. Has anyone profiled the
> > usage of PyGTK applications. Can it be improved?
> I'm not sure if any work has been done on this since PyCon 2005, but if
> not then Python will always have problems. Summary of paper: its memory
> allocator optimises for CPU speed over memory usage by never freeing
> anything, instead it runs its own heaps which just grow and grow over
> time. 
> The garbage collector also has serious problems, for instance it's not
> compacting so even if heap space could be returned to the OS often they
> would not be due to fragmentation.
> So assuming there has been no action on this front I guess
> there are three ways to fix this:
>  * Fix the Python interpreter to use a real compacting GC

      - OK, but you'd lose some speed..  you can always compile python
with configure --without-pymalloc... probably does something similar to
what you want.

>  * Rewrite the applet in something other than Python and which
>    isn't going to cause massive flamewars (which basically means
>    C or C++)

     * Rewrite performance-sensitive parts of the deskbar applet in C,
but keep the rest in python.

>  * Somebody could implement a Python-like language which compiles
>    to native code. But then you'd have pretty much cloned Boo, and
>    might as well be using Mono anyway.

  Work is underway to generate C++ from python code:

  Finally, I should mention that a future pygtk version should decrease
memory usage, and improve startup time, by registering GObject wrappers
on demand, and by using mmapped introspection information, instead of
code generation of wrappers for everything upfront.

  We hope the new introspection-powered version will be available for
gtk 2.10, if all goes well...


Gustavo J. A. M. Carneiro
<gjc inescporto pt> <gustavo users sourceforge net>
The universe is always one step beyond logic.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]