Bug 419429 - tags:/ url creates huge IO load and temporarily eats up all disk space during thumbnail creation
Summary: tags:/ url creates huge IO load and temporarily eats up all disk space during...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-baloo
Classification: Frameworks and Libraries
Component: Tags (show other bugs)
Version: 5.68.0
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Stefan Brüns
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-30 20:07 UTC by Bernhard Scheirle
Modified: 2020-09-05 14:53 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.74


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Scheirle 2020-03-30 20:07:20 UTC
SUMMARY
Opening a "tags:/" url in dolphin creates huge IO load and temporarily eats up all disk space while thumbnails are created.


STEPS TO REPRODUCE
1. Have 2 HDDs (sda and sdb) [Not sure if this is required]
   The OS and especially /tmp/ is located on sda.
   User data is on sdb.
2. Tag large files (>100MB; The larger the easier to reproduce) on sdb with a tag containing fragments: MyTag/MySubTag
3. Open "tags:/MyTag/MySubTag/

OBSERVED RESULT
Dolphin creates new thumbnails. (Even if the thumbnails were previously already created by opening the original file location (on sdb).)
To create the thumbnails Dolphin copies the original files to /tmp/dolping.<xyz.part thereby creating a huge IO load and likely fills up sda completely.
A full /tmp/ directory further then leads to all kind of other issues.

EXPECTED RESULT
* Don't copy files to /tmp/ to create thumbnails.
* Don't create new thumbnails if already created for the original file.


SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.18
KDE Plasma Version: 5.18.3
KDE Frameworks Version: 5.68.0
Qt Version: 5.14.1
Kernel Version: 4.15.0-91-generic
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-3770 CPU @ 3.40GHz
Memory: 15,5 GiB
Comment 1 Stefan Brüns 2020-08-25 13:08:54 UTC
The tags: ioslave does not set a local url in the KFileItem. This works correctly for both timeline: and baloosearch:
Comment 2 Stefan Brüns 2020-08-31 22:43:01 UTC
Git commit 4361af3042342fd989653e15dbd363def3c3b3be by Stefan Brüns.
Committed on 31/08/2020 at 22:42.
Pushed by bruns into branch 'cleanup_uds'.

Use common UDS creation code also for tags

This gets rid of the KIO::StatJob and makes the UDS entry more
complete. Most importantly, it sets a local URL so thumbnails no longer
require a temporary copy.

M  +14   -20   src/kioslaves/tags/kio_tags.cpp

https://invent.kde.org/frameworks/baloo/commit/4361af3042342fd989653e15dbd363def3c3b3be
Comment 3 Stefan Brüns 2020-09-05 14:53:01 UTC
Git commit 2e41b5a263e57aa4dc4868e9ce44a790384bd349 by Stefan Brüns.
Committed on 05/09/2020 at 14:28.
Pushed by bruns into branch 'master'.

Use common UDS creation code also for tags

This gets rid of the KIO::StatJob and makes the UDS entry more
complete. Most importantly, it sets a local URL so thumbnails no longer
require a temporary copy.

M  +14   -20   src/kioslaves/tags/kio_tags.cpp

https://invent.kde.org/frameworks/baloo/commit/2e41b5a263e57aa4dc4868e9ce44a790384bd349