Each out of process applet we have on gnome-panel costs about 1 mb of ram. Almost all users have 3 applets: clock, wnck, and notification. Laptop users generally have a battery applet. We also need to identify other very common applets so that we can look into them as well.
For an applet to be put in process, it needs:
- To be very stable -- that means pretty much no crashing
- To be well tested (goes with the above)
- FIXME: more requirements
IIRC, these applets were moved out of process precisely for stability reasons (eg. the clock applet isn't as simple as it once was, with the evolution-data-server integration). There is a middle ground between going in-process and what we have right now: combine a number of related applets into a single process. The wnck-applet already does this for the workspace switcher, window list, etc. Perhaps there are other applets that could be merged? -- JamesHenstridge 2005-03-01 09:17:37
BenMaurer: if the clock is dying alot for our users, we have much bigger problems than the gnome-panel dying and getting started. On a stable version of GNOME, I've never seen a crash. Maybe people who develop GNOME think the problem is worse than it is because they experience regressions all to often...
An example of how to make an applet in process:
[benm@omega gnome-panel]$ cvs di Index: applets/clock/GNOME_ClockApplet_Factory.server.in.in =================================================================== RCS file: /cvs/gnome/gnome-panel/applets/clock/GNOME_ClockApplet_Factory.server.in.in,v retrieving revision 1.25 diff -u -r1.25 GNOME_ClockApplet_Factory.server.in.in --- applets/clock/GNOME_ClockApplet_Factory.server.in.in 11 Nov 2004 08:16:43 -0000 1.25 +++ applets/clock/GNOME_ClockApplet_Factory.server.in.in 1 Mar 2005 04:22:45 -0000 @@ -1,8 +1,8 @@ <oaf_info> <oaf_server iid="OAFIID:GNOME_ClockApplet_Factory" - type="exe" - location="@LIBEXECDIR@/clock-applet"> + type="shlib" + location="@LIBDIR@/libclock-applet.so"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:Bonobo/GenericFactory:1.0"/> Index: applets/clock/Makefile.am =================================================================== RCS file: /cvs/gnome/gnome-panel/applets/clock/Makefile.am,v retrieving revision 1.71 diff -u -r1.71 Makefile.am --- applets/clock/Makefile.am 4 Nov 2004 17:11:10 -0000 1.71 +++ applets/clock/Makefile.am 1 Mar 2005 04:22:45 -0000 @@ -20,16 +20,16 @@ calendar-debug.h endif -clock_applet_SOURCES = clock.c $(CALENDAR_SOURCES) +libclock_applet_la_SOURCES = clock.c $(CALENDAR_SOURCES) -clock_applet_LDADD = \ +libclock_applet_la_LIBADD= \ ../../libpanel-applet/libpanel-applet-2.la \ $(CLOCK_LIBS) -libexec_PROGRAMS = clock-applet +lib_LTLIBRARIES = libclock-applet.la GNOME_ClockApplet_Factory.server.in: GNOME_ClockApplet_Factory.server.in.in - sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" $< > $@ + sed -e "s|\@LIBDIR\@|$(libdir)|" $< > $@ uidir = $(datadir)/gnome-2.0/ui ui_DATA = GNOME_ClockApplet.xml Index: applets/clock/clock.c =================================================================== RCS file: /cvs/gnome/gnome-panel/applets/clock/clock.c,v retrieving revision 1.164 diff -u -r1.164 clock.c --- applets/clock/clock.c 19 Feb 2005 15:00:47 -0000 1.164 +++ applets/clock/clock.c 1 Mar 2005 04:22:45 -0000 @@ -2137,7 +2137,6 @@ gtk_container_set_border_width (GTK_CONTAINER (cd->toggle), 0); gtk_container_add (GTK_CONTAINER (cd->applet), cd->toggle); - gtk_window_set_default_icon_name ("clock"); gtk_widget_show (cd->applet); /* FIXME: Update this comment. */ @@ -2619,9 +2618,8 @@ return retval; } -PANEL_APPLET_BONOBO_FACTORY ("OAFIID:GNOME_ClockApplet_Factory", +PANEL_APPLET_BONOBO_SHLIB_FACTORY ("OAFIID:GNOME_ClockApplet_Factory", PANEL_TYPE_APPLET, "ClockApplet", - "0", clock_factory, NULL);