| Summary: | Loading HEIC photos from SMB shares is very slow | ||
|---|---|---|---|
| Product: | [Applications] digikam | Reporter: | Benny <jff2k> |
| Component: | Plugin-DImg-HEIF | Assignee: | Digikam Developers <digikam-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | caulier.gilles, jff2k, metzpinguin |
| Priority: | NOR | ||
| Version First Reported In: | 8.6.0 | ||
| Target Milestone: | --- | ||
| Platform: | Microsoft Windows | ||
| OS: | Microsoft Windows | ||
| Latest Commit: | https://invent.kde.org/graphics/digikam/-/commit/bf8bb74017e1aa1ba1f78116aa81d186de50b9de | Version Fixed/Implemented In: | 8.8.0 |
| Sentry Crash Report: | |||
|
Description
Benny
2025-06-11 18:55:15 UTC
SMB achieves about a tenth of the data throughput (110 Mbps) on a 1 Gbps network. Windows uses an encrypted connection, so speed can vary dramatically depending on the hardware. Try enabling SMB compression; digiKam can't speed up the connection. Google for optimization options for SMB. We've already mentioned in another bug report that libheif is slow and that bug reports exist for the project. Maik Hi Maik, thank you for your answer. When I connect to the SMB share hosted locally on the same Windows-PC, network speed is no limitation - but it is still really slow in processing the image (about 5 seconds ). My setup is a Media-PC (Ryzen 5 4600, 32GB RAM, Gbit-LAN) with the Network Share on it and DigiKam installed. A second PC in the workroom while DigiKam connects to the Media-PC (Ryzen 5700, 32GB RAM, Gbit-LAN) and 110MB/s throughput. On both PCs dealing with HEIC-images is not really possible. What's the performance to load HEIF image if file is stored locally and not through the network. It's know that libheif used in background by digiKam is not optimized for speed and few upstream bugs are open in libheif bugzilla about this topic. Look these entries for the story: https://github.com/strukturag/libheif/issues/1215 https://github.com/strukturag/libheif/issues/645 https://github.com/strukturag/libheif/issues/472 There are work in progress about parallel decoding in libde265 code used by libheif : https://github.com/strukturag/libheif/issues/807 Note : libheif version in Help/Components Info dialog must be >= 1.19 to see any improvements... To resume: the decoding performances is mostly focused in background libraries, not digiKam. It's the same problem with the encoding. Best Gilles Caulier Hi Gilles, sorry for the delay. I just tested the performance again: It takes less than a second for locally stored HEIC pictures to show in preview mode (local collections). I selected images for preview I've not selected before and it took 25 to 50 seconds to show as preview from SMB share (over Gbit-LAN, Ryzen 5700X, 32GB RAM) over collections on network shares. The same pictures on the locally hosted SMB share takes 4 to 5 seconds to show in preview mode over collections on network shares. In summary: Locally stored: <1 s SMB over 1Gbit: 25-50 s SMB over local host: 4-5 s Additional strange behaviour.... When I open a HEIC image from the thumbnail view (SMB over 1Gbit), press Ctrl+C and paste the copied picture via Ctrl+V to a Windows Explorer window, the image instantly shows as preview as soon as it is pasted to the folder (within 5 s). So there seems to be a problem in caching the image over network before previewing it? I just made some additional testing: I set up a QNAP with a 2.5 Gbps connection and tried my sample pictures on the QNAP with an SMB 3.0 Share on the QNAP (180-220 MB/s throuput over 2.5 Gbps connection). Opened DigiKam on Windows 11 and added my sample pictures on the QNAP as a new collection on network shares. It took 50 to 60 seconds too to open a not-preloaded HEIC-image in the preview window inside of DigiKam 8.7.0 Build Date 09.06.2025 13:02 (LibHEIF 1.19.5). I still hope you could add a workaround for this behaviour. Here you can download my sample HEIC photos: https://www.jff2k.de/upload/files/2025/test_heic.zip Are there any news on this issue? Git commit ce888cd2ee75b5575230f784514c8d6f88eb46bd by Maik Qualmann. Committed on 04/08/2025 at 16:38. Pushed by mqualmann into branch 'master'. for a test use libheif file API to load M +5 -1 core/dplugins/dimg/heif/dimgheifloader_load.cpp https://invent.kde.org/graphics/digikam/-/commit/ce888cd2ee75b5575230f784514c8d6f88eb46bd A new pre-release version of digiKam-8.8.0 with the change is available. Please test whether there is a change when loading HEIF images over the network. https://files.kde.org/digikam/ Maik Hi Maik, I've just tried the new 8.8.0 with build date 05.08.2025 06:19 and accessing HEIC images over network is now extremely fast! There is nearly no delay when opening HEIC photos in preview. Thank you very much! Git commit bf8bb74017e1aa1ba1f78116aa81d186de50b9de by Maik Qualmann. Committed on 05/08/2025 at 10:34. Pushed by mqualmann into branch 'master'. remove QIODevice load/save from the HEIF DImg loader Support for UTF-8 is ensured by our manifest file. FIXED-IN: 8.8.0 M +1 -1 NEWS M +5 -58 core/dplugins/dimg/heif/dimgheifloader_load.cpp M +1 -45 core/dplugins/dimg/heif/dimgheifloader_save.cpp https://invent.kde.org/graphics/digikam/-/commit/bf8bb74017e1aa1ba1f78116aa81d186de50b9de Thanks again for your feedback. The question remains whether QIODevice is actually that bad over an SMB share, or only in this context. We'll keep an eye on it in the future. Maik |