Summary: | cache directory thumbnails | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kio-extras | Reporter: | Harald Sitter <sitter> |
Component: | Thumbnails and previews | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | REPORTED --- | ||
Severity: | normal | CC: | stefan.bruens |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Harald Sitter
2020-06-26 11:32:10 UTC
For a complete, correct implementation, you have to: - Fetch the cached directory thumbnail - Get the base folder icon (thats the reason KFileItem::iconName is used) -> If the base icon changed, DoRecomposite=true - Iterate the directory, for each entry up to 4: -- create the URL MD5 -- read the MTime -- check if the thumb is cached and if the MTime matches (1) --- if not, (Re)Create the item thumbnail -> DoRecomposite=true - If DoRecomposite, create the directory thumbnail, else fetch So, you need the following metadata in the dir thumbnail: - base icon name and theme (still not sufficient, appearance may change) - URL MD5, MTime Now, the next complication is, directory thumbnails are ThumbSequences, so you get one cached dir thumb for subitems 1-4, one for 5-8, 9-12, ... Do you really see compositing the icon as some kind of bottleneck? (1) This can either be done per individual thumbnail, or, in your proposal, from a composite key in the directory thumbnail. If you don't save the MTime in the directory thumb meta, you have to load each item thumbnail. Perhaps bug 423537 would bring better improvements for less work. The trouble is that if you browse around a huge dir tree as described in https://bugs.kde.org/show_bug.cgi?id=178678#c71 the triviality of composition becomes all extra work and a huge waste. I got it to hang on IO a couple of times over the network while doing directory thumbing but there's multiple levels to this, bug 178678 has a bunch of related reports which overlap more aggressive caching (e.g. KFileItem::iconName bug #423499 would help tremendously as well). |