[Geany-devel] GtkRecentManager slowness (was: Re: [patch] Improved documents list sorting)

Enrico Tröger enrico.troeger at xxxxx
Thu Apr 29 15:34:13 UTC 2010

On Wed, 28 Apr 2010 14:08:12 +0200, Colomban wrote:

>Colomban Wendling a écrit :
>>>> I noticed this long time ago already and it's quite annoying and
>>>> needs to be fixed. My first guess without having done any
>>>> investigations, we are doing too much UI updating stuff on bulk
>>>> loading of files (e.g. the previously mentioned resorting of the
>>>> document list, there are probably many more such issues).
>>> I think it isn't only UI stuff because my system monitor shows me
>>> (lot of) I/O, that seems to be heavy disk *writes*, in addition to
>>> simple CPU usage. Note that this happens effectively only after the
>>> files being loaded (hum, after the info about them are shown).
>> Haha, got it! Thanks to gdb, I found what takes all this time:
>> GtkRecentManager, and particularly gtk_recent_manager_add_item
>> (manager, uri) at line 1037 of ui_utils.c.
>> Why? well, it seems to syncs its state at each and every addition,
>> and the g_file_set_contents(), which calls… fsync().
>> Commenting the addition completely fixes the problem after file
>> loading. Now it takes about 11 seconds, to load the files (always as
>> reported by the verbose messages).
>> Time to search for a but report on GTK I think.
>I reported this to GTK, and written a small (and probably not perfect)
>patch that fixes the problem:
>Hope somebody take a look at this and fix it in the next GTK release.

Thanks so much for taking the time to investigate the issue, report it
and even provide a patch for GTK. Let's hope it'll get fixes soon.


Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20100429/812b9f3f/attachment.pgp>

More information about the Devel mailing list