Re: Performance ideas (resend) ...

On Tue, Mar 3, 2009 at 4:35 AM, Michael Meeks <michael meeks novell com> wrote:

> The next
> outstanding offender is:
> ([0x8067df8])->all_dirs ('/desktop/gnome/thumbnailers', )
> ([0x8067df8])->lookup_with_schema_name ('/desktop/gnome/thumbnailers/audio x-pn-realaudio/enable', 'en_GB.UTF-8', 1, , , )
> ([0x8067df8])->lookup_with_schema_name ('/desktop/gnome/thumbnailers/audio x-pn-realaudio/command', 'en_GB.UTF-8', 1, , , )
> ([0x8067df8])->lookup_with_schema_name ('/desktop/gnome/thumbnailers/application vnd oasis opendocument i ...', 'en_GB.UTF-8', 1, , , )
> ([0x8067df8])->lookup_with_schema_name ('/desktop/gnome/thumbnailers/application vnd oasis opendocument i ...', 'en_GB.UTF-8', 1, , , )
> ..
>        which looks up -all- keys in this directory, without pre-loading,
> individually and at substantial cost: all, of course, without (I hope)
> thumbnailing -anything- on login ;-)
>        It would be great to have someone to track the source of these down and
> clue-bat that code about a bit. If indeed we can't defer it we should
> pre-load it. I suspect an infrastructure library, since we do this twice
> for each key ;-)

The culprit is the GnomeDesktopThumbnail code in


Presumably, it has to load all keys upfront in an idle that runs in
the main thread because
gnome_desktop_thumbnail_factory_generate_thumbnail is supposed to be
threadsafe, but GConfClient is not.

Possible fixes:

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

- Change the thumbnail api to be async, so that we can defer any gconf
calls to an idle running in the main thread. We can cache the result
of the gconf lookup, so only the very first call for each mime type
would be deferred to an idle.

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