! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Unresponsive UI on icons tab
Status:
RESOLVED: MOVED
Product:
Xfce4-settings
Component:
Appearance Settings

Comments

Description Steve Dodier-Lazaro editbugs 2016-08-04 14:00:14 CEST
Just writing this down so there's a record and someone gets around to doing it some day

Context: the devs implemented previews for icon themes and GTK+ themes

Problem: bitmaps for themes must be generated before the UI actually switches to the tab and shows the list of themes. It's slow, especially for icon themes with a multiple-second delay

Solution 1: multithreading. create a GThread that will generate pixmaps and emit a signal as they become available, and connect the object that handles the list to that signal so it updates individual list items as the pixmap becomes available

Solution 2: caching. once you have a bitmap, check the mtime of the theme's directory (which you used to generate the pixmaps), and save the mtime and the pixmap in $XDG_USER_CACHE/xfce/appearance-settings/. When loading themes, first identify the corresponding folder, and check if there's an entry in the cache with an identical mtime. If so, reload that pixmap instead.

Solution 1 is better as it avoids unresponsiveness on the first use (and that's, for quite a bunch of users, nearly the only time they will use the dialog). It's also easier to implement. Solution 2 would provide faster loading of previews on subsequent loads. Both can be combined.

This qualifies as an easy bug fix for newcomers.
Comment 1 Git Bot editbugs 2020-05-28 23:06:02 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfce4-settings/-/issues/84.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #12740

Reported by:
Steve Dodier-Lazaro
Reported on: 2016-08-04
Last modified on: 2020-05-28

People

Assignee:
Nick Schermer
CC List:
2 users

Version

Version:
4.12.0

Attachments

Additional information