Re: Gnome 2.14 Module Proposal: Deskbar Applet



Qui, 2005-10-27 às 11:05 +0200, Benoît Dejean escreveu:
> Le jeudi 27 octobre 2005 à 10:32 +0200, Thomas Vander Stichele a écrit :
> > On Wed, 2005-10-26 at 19:18 +0200, Benoît Dejean wrote:
> > > Le mercredi 26 octobre 2005 à 19:04 +0200, Thomas Vander Stichele a
> > > écrit :
> > > > Hi,
> 
> hi
> 
> > > > But are you sure that 10 python applets would each consume 22 MB ? How
> > > > much of this 22 MB would be shared among python applets ?
> > > 
> > > In my my first email, i reported that deskbar-applet takes 22MB RES :
> > > 10MB are writable and can't be shared.
> > 
> > Ok, so the non-sharable part is about what you would accept as an
> > applet's consumption ?
> 
> yes. But keeping in mind that other applets take < 10MB shared + private
> 
> > Further, there are ways to make the applets share the python process
> > space, which would make them share a big chunk of the 10 MB
> > non-shareable space.
> 
> Share with which other processes ? I'm very curious about this. And as i
> explained, i did a lot of python, and i don't know how reduce memory
> usage (especially how to reduce private memory usage). So i think it's
> very unlikely to happen.

  It's possible, and I know how.

  Say you have 10 python applets.  Now, it should be feasible to
leverage the bonobo component system to make them all share the same
process, like this:
	1. Create a special exe factory, which is a python program;
	2. This special factory, for each OAFIID to activate, would:
		i) import a module with the same name as the iid;
		ii) call a predefined get_object() function on this module;
	3. Each python applet would install a .server file that would reference
the python factory IID;
	4. Each python applet would install it's code as a python
module/package with the name of the IID;

  The result: a single process (per user, per display), and a single
main loop, for all applets.  Of course this means if one applet
deadlocks or dies, they all die.  But at least dying in python is not so
easy.  You usually get only an exception that is ignored.  Deadlock is
easier if they use threads.

  Regards.

-- 
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]