After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 476342 - Icon cache validation causes severe page-in
Icon cache validation causes severe page-in
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
2.11.x
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-09-12 20:56 UTC by Federico Mena Quintero
Modified: 2007-12-01 17:00 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Patch to make validation run only if GTK_DEBUG=icontheme (3.70 KB, patch)
2007-09-12 22:05 UTC, Federico Mena Quintero
none Details | Review

Description Federico Mena Quintero 2007-09-12 20:56:03 UTC
GtkIconCache now runs _gtk_icon_cache_validate() for every cache loaded.  This causes a big chunk of each icon cache file to be paged in; this makes apps slow at startup when it is likely that other apps have caused the icon caches to be paged out.

This started out as https://bugzilla.novell.com/show_bug.cgi?id=303869
Comment 1 Federico Mena Quintero 2007-09-12 22:05:19 UTC
Created attachment 95485 [details] [review]
Patch to make validation run only if GTK_DEBUG=icontheme

This is the patch I'll be using for Novell's gtk+ package.
Comment 2 Matthias Clasen 2007-09-13 00:23:06 UTC
I've already committed a slightly different version to trunk.
Comment 3 Federico Mena Quintero 2007-09-13 18:42:38 UTC
(In reply to comment #2)
> I've already committed a slightly different version to trunk.

Huh, where?  :)  It just updated and it's not there.
Comment 4 Matthias Clasen 2007-09-13 20:32:03 UTC
In gtkiconcache.c:

#ifdef G_ENABLE_DEBUG
  if (gtk_debug_flags & GTK_DEBUG_ICONTHEME)
    {
      if (!_gtk_icon_cache_validate (&info))
        {
          g_mapped_file_free (map);
          g_warning ("Icon cache '%s' is invalid\n", cache_filename);

          goto done;
        }
    }
#endif
Comment 5 Federico Mena Quintero 2007-09-14 00:28:16 UTC
I just updated from trunk and that code is definitely not there :)
Comment 6 Matthias Clasen 2007-09-14 02:10:57 UTC
Grr, I must be seeing ghosts. 

I was 100% sure that I committed it. But you are right, now that I am looking again, it is not there. Too bad. Let me commit it now. I'll mention it in the release announcement, maybe.
Comment 8 Federico Mena Quintero 2007-11-30 18:27:51 UTC
Marking as fixed since the patch is committed now.
Comment 9 Matthias Clasen 2007-12-01 17:00:45 UTC
Btw, federido, did anything ever come out of the icon cache optimization work that somebody was doing ?