[Geany-devel] [patch] Improved documents list sorting

Colomban Wendling lists.ban at xxxxx
Wed Apr 28 12:08:12 UTC 2010


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:
https://bugzilla.gnome.org/show_bug.cgi?id=616997
Hope somebody take a look at this and fix it in the next GTK release.



More information about the Devel mailing list