File thumbnails are usually a lot more prominent and quicker to be generated. We shouldn't stall generating the file thumbnails on generating some tiny folder thumbnails that might take a while since it may recurse into subdirectories.
Details
- Reviewers
elvisangelaccio - Group Reviewers
Dolphin VDG
- Opened my pictures folder, had my picture thumbnails show up immediately, it took a couple of seconds, though, for it to start generating the folder thumbnails again, so not sure if this is optimal?
Diff Detail
- Repository
- R318 Dolphin
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Is this about generating the thumbnails for the first time or displaying them?
Both. Generating takes obviously longer but it still takes a split second to load the thumbnail even if it is cached
Just gave this a try on my pictures folder, with "Folders first" turned on (it's the default setting). Observations:
- In a folder with a small number of sub-folders and a large number of images, it's nicer, since the fime thumbnails show up faster
- In a folder with a medium number of sub-folders, it's tiny bit odd but mostly fine.
- In a folder with a large number of sub-folders (more than will fit on the screen at once), it's very odd since it looks like nothing it happening for a few moments.
What would happen if the user selects a view mode that is contrary to the arrangement of Folders > Thumbnails and instead arranged the sorting to be Thumbnails (Images) > Folders ? Would this mean that folders load first still?
This makes folders load last, not first. There is no "thumbnails before folders" mode, but there is a mode to intersperse folders within files (the way macOS finder does by default). In this mode, the change is much less noticeable.
Did you check the updated version with stable_partition? It makes the folders generate in the correct order as well.
Yes, I used the latest version of the patch. My comments are still:
- With folders interspersed within the files: big improvement
- With folders first:
- Small number of sub-folders: big improvement
- Medium number of sub-folders: a wash
- Enough sub-folders so that you need to scroll to see any files: regression since it seems for a moment that nothing's happening
FWIW on my fast SSD-based machine, it's all mostly a wash, as the thumbnails are displayed almost faster than I can notice.
Perhaps, could we only opt in to this behavior when the number of sub-folders is below some threshold? That would eliminate the only minor regression. Even better if that threshold could be dynamically determined and correspond to "a number equal to how many items can appear in the current window". In other words, we should not do this there are folders and files, but only folders are visible (because then it looks like nothing is happening for a moment).