Bug 450261 - Digikam searches for sidecar files even though reading them is disabled
Summary: Digikam searches for sidecar files even though reading them is disabled
Status: RESOLVED INTENTIONAL
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Sidecar (show other bugs)
Version: 7.5.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-14 23:32 UTC by Theliel
Modified: 2022-02-15 19:51 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.6.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Theliel 2022-02-14 23:32:19 UTC
I was debugging my PC's samba connections with Wireshark, when I started seeing constant xmp file access errors. I have never used sidecar files, but in any case I made sure that the read/write options on Digikam aboyt sidecar files were disabled

STEPS TO REPRODUCE
1.  Make sure that read/write sidecar files are disabled
2. Select any image in your library
3. Use any tool to see digikam file access. Observed for first time with wireshark
4. Digikam try to access to the xmp file sidecar (1.jpg, search for 1.xmp and 1.jpg.xmp in the same folder). 


OBSERVED RESULT

Digikam try to find for each selected image, the sidecar xmp. even when the use of sidecar files is disabled. This is an avoidable waste of resources especially when the photos are being accessed remotely, for example via SMB


EXPECTED RESULT

Since the use of sidecar files is disabled, Digikam should never attempt to access sidecar files. It's not really a big problem, especially when we work with local files, but in remote files, where we usually have lower performance and higher latency, any improvement is welcome. 


SOFTWARE/OS VERSIONS
Windows:  11
Comment 1 Maik Qualmann 2022-02-15 07:32:32 UTC
I'll debug it tonight, but I'm pretty sure digiKam won't look for sidecars during startup scan if the option is disabled. A quick look at the code confirms this.
If you select a single image in the GUI and have the Properties tab open, it will look for a sidecar. This is intentional because the property is intended to show whether the image has a sidecar, regardless of the setting to read or write sidecars.

Maik
Comment 2 caulier.gilles 2022-02-15 08:15:58 UTC
It can be a rule in Exiv2 engine where we don't have a control in digiKam side...

Gilles
Comment 3 Theliel 2022-02-15 08:32:15 UTC
Thanks for the support.

It seems to happen only when selecting an image, no matter if the properties panel is open or closed
Comment 4 Maik Qualmann 2022-02-15 19:51:17 UTC
A search for a sidecar only occurs when the Properties tab is selected, regardless of whether the sidebar is collapsed or expanded. This behavior is desired because we want to indicate whether a sidecar exists. This is not a loss of performance, it is only searched for when a file is selected individually.
There are more sidecar searches when copying and moving images. We need to make sure that if sidecars are present, they are also copied/moved. Otherwise they would be left orphaned, regardless of whether sidecars are activated or not. I close the bug, the behavior is technically necessary.

Maik