Create icon-theme.cache file to support mmap()ed icon loading

Bug #711304 reported by Mikkel Kamstrup Erlandsen
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
app-install-data-ubuntu
Fix Released
Medium
Michael Vogt

Bug Description

It would be great for Unity if we had a icon-theme.cache file in /usr/share/app-install/ to be used with GtkIconTheme. That would give us mmap()ed IO for loading all the icons for the apps in the "Available" group.

I tested it locally by dropping a simple index.theme file in /usr/share/app-install/ and then running 'sudo gtk-update-icon-cache /usr/share/app-install/'. It gives a 22mb cache file which isn't so bad compared to the 35mb .cache file for the default gnome theme.

Tags: patch
Michael Vogt (mvo)
Changed in app-install-data-ubuntu:
assignee: nobody → Michael Vogt (mvo)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Michael Vogt (mvo) wrote :

This creates the icon theme but in my tests via s-c its not mapping it. Would be nice to know that content your
theme.index file has.

Revision history for this message
Michael Vogt (mvo) wrote :

Mikkel was kind enough to add some test code:
$ python -c 'import gtk; icons = gtk.IconTheme(); icons.append_search_path("/usr/share"); icons.set_custom_theme("app-install"); print icons.load_icon("zhone", 48, 0); gtk.main()'

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

The key thing is that the Name field in the index.theme must match the parent dir. Ie. Name=app-install and not Name=app-install-data.

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Just worth mentioning is that this should also very noticeably decrease the IO load of the Ubuntu Software Center on startup - provided that it's tweaked to use the cache as well :-)

Alex Launi (alexlauni)
Changed in unity:
status: New → Confirmed
importance: Undecided → Low
importance: Low → Wishlist
Changed in unity (Ubuntu):
status: New → Confirmed
tags: added: patch
Revision history for this message
Michael Vogt (mvo) wrote :

This is part of the app-install-data upload now.

Changed in app-install-data-ubuntu:
status: In Progress → Fix Released
Changed in unity (Ubuntu):
importance: Undecided → Wishlist
status: Confirmed → Triaged
Changed in unity:
status: Confirmed → Triaged
Andrea Azzarone (azzar1)
no longer affects: unity (Ubuntu)
no longer affects: unity
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Patches

Remote bug watches

Bug watches keep track of this bug in other bug trackers.