No need to load 18 preview pixmaps of which 12 can only be seen during the animation.
Furthermore, cache the pixmaps as ListView deletes and recreates delegates as you scroll, leading to us recreating the icon pixmaps as you scroll up and down with many themes installed
Details
Details
- Reviewers
mart davidedmundson - Group Reviewers
Plasma - Commits
- R119:d8b6f90e2ddb: [Icons KCM] Load preview pixmaps for animation on-demand and cache them
5.13 branch
- Pixmaps are cached
- KCM opens a lot faster now that only 6 pixmaps are loaded per theme
- The animation still works fine, even when icons are missing
Diff Detail
Diff Detail
- Repository
- R119 Plasma Desktop
- Lint
Lint Skipped - Unit
Unit Tests Skipped
kcms/icons/main.cpp | ||
---|---|---|
482 | so if you request previewIcons with a limit of 6 then request again with a limit of 12 you're duplicating the first 6 in another cache. If you're going to have this limit, would having a cache per icon then building the list on every invocation would be cleander? (would also allow use of QPixmapCache which has a nice auto-expunge) |
Comment Actions
- Use QPixmapCache to cache on a per-icon basis and avoid duplicating the first 6 icons when all are loaded