| Summary: | Improve performance of album's cache [patch] | ||
|---|---|---|---|
| Product: | [Applications] digikam | Reporter: | Eugene Vert <eugene.a.vert> |
| Component: | Albums-Engine | Assignee: | Digikam Developers <digikam-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | CC: | caulier.gilles, metzpinguin |
| Priority: | NOR | ||
| Version First Reported In: | 9.1.0 | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/graphics/digikam/-/commit/ec79a49979f46b749cb1ae713f6ba9872ae7d19e | Version Fixed/Implemented In: | 9.1.0 |
| Sentry Crash Report: | |||
| Attachments: |
Proposed patch
childCacheIndex.patch |
||
how many tags assigned in your collections ? how many items by album ? Maintaining the index of the children's albums has always been a performance issue. Previously, we would manually go through all the parents' albums and count them; QList provided a huge boost in this regard. We probably lose some speed when removing albums, but this happens far less frequently. I would still like to tweak it slightly. Maik Created attachment 191465 [details]
childCacheIndex.patch
Maik, Thank you for the patch! After applying it, navigation is smooth and the lag is gone. Git commit ec79a49979f46b749cb1ae713f6ba9872ae7d19e by Maik Qualmann. Committed on 12/04/2026 at 09:05. Pushed by mqualmann into branch 'master'. get child index faster based on the idea of Eugene Vert FIXED-IN: 9.1.0 M +1 -1 NEWS M +25 -20 core/libs/album/engine/album.cpp M +1 -1 core/libs/album/engine/album.h https://invent.kde.org/graphics/digikam/-/commit/ec79a49979f46b749cb1ae713f6ba9872ae7d19e |
Created attachment 191455 [details] Proposed patch SUMMARY `Album::rowFromAlbum` is using `m_childCache.indexOf` and it causes a noticeable delay (~1.5s for Captions->Tags to update) when navigating through an album in Thumbnails view with "Show Assigned Tags"/"Tags already assigned" enabled. It's the most noticeable issue, but after the patch most album operations also became a bit snappier. STEPS TO REPRODUCE 1. Open Captions->Tags sidebar in Thumbnails view 2. Enable "Tags already assigned" in Captions->Tags sidebar 3. Select image 4. Select other image OBSERVED RESULT ~1.5s delay until Captions->Tags sidebar is updated. ADDITIONAL INFORMATION In `Album` class, `m_childCache` is a `QList<Album*>` container. Instead of sequential search (`indexOf`), maybe it's better to use `QHash` for lookup speed while maintaining `QList` ordering. Proposed patch attached