Re: Performance ideas (resend) ...



Hi Matthias,

On Wed, 2009-03-04 at 00:56 -0500, Matthias Clasen wrote:
> The culprit is the GnomeDesktopThumbnail code in
> libgnomedesktop/gnome-desktop-thumbnail.c

	Oh - nice; and any idea why we fetch each key twice ? ;-) it looks like
a couple of processes initialise the thumbnailer [ but perhaps this is
again a SLED-specific joy with the main-menu (?) ].

> - Use a private GConf client+engine instance instead of using the
> default one (not sure if this is possible...)

	Not sure that would be any more thread-safe really; though it would be
at the IPC level.

	Did you consider doing:

	if (g_main_context_is_owner (NULL)) {
		/* we are the main thread or equivalent */
		do_gconf_foo_init (NULL);
	} else {
		Waiter foo;
		g_idle_add (do_gconf_foo_init, &foo);
		g_pseudo_foo_wait (&foo);
	}

	As/when the thumbnailing API itself is called ? at least, this is what
I intended g_main_context_is_owner to be good for (though perhaps it is
still not quite what we want) ;-)

	I guess the delaying things until 30secs suffers from the same "how to
wait for something done at idle" problem - but hopefully the is_owner
method fixes things. Of course, is_owner is perhaps not entirely right -
if we're called without a main-loop at all, perhaps we need to try to
acquire it first but ... 

	HTH,

		Michael.

-- 
 michael meeks novell com  <><, Pseudo Engineer, itinerant idiot



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