Re: Developing and Testing panel applets



> Why do you think that a library will use less memory than an
> application? Shared libraries are still shared whether they are used by
> a library or by an application, surely.
I can explain. Because your applet is a standalone application, all the
gnome libraries are loaded by the application independently. And even
with shared code segments, new data segments will be created for your
application. For shared library, you'll share all the gnome libs' data
with gnome-panel and other applets.

So, for shared lib you'll have:
1. gnome-panel code
2. gnome shared libs
3. gnome shared libs' data
4. your code
5. your data

For standalone app:

1. gnome-panel code
2. gnome shared libs
3. gnome shared libs' data for gnome-panel

4. your code
5. your data
6. gnome shared libs' data for your application.

This is very schematic but explains what I mean. Now the question is:
how much memory does gnome data take? Also, you should keep in mind,
that even in modern Unices, a process is rather heavyweight beast - so
why create the extra one? The only downside is ... well, you have to be
VERY accurate in your code - and do not break things, because they would
affect the entire panel. But I always thought the developer should be
accurate anyway - so some more reasons for that are not bad:) Sure, I
can never claim I am as accurate as I would like to be:)

Gurus, am I wrong?

-- 
Sergey

Attachment: signature.asc
Description: This is a digitally signed message part



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