Discussion:
D14770: Generate file thumbnails before folder thumbnails
Kai Uwe Broulik
2018-08-12 14:52:08 UTC
Permalink
broulik created this revision.
broulik added reviewers: Dolphin, elvisangelaccio, VDG.
Restricted Application added a project: Dolphin.
Restricted Application added a subscriber: kfm-devel.
broulik requested review of this revision.

REVISION SUMMARY
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.

TEST PLAN
- 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?

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D14770

AFFECTED FILES
src/kitemviews/kfileitemmodelrolesupdater.cpp

To: broulik, #dolphin, elvisangelaccio, #vdg
Cc: kfm-devel, spoorun, navarromorales, firef, andrebarros, emmanuelp
Nathaniel Graham
2018-08-13 07:53:27 UTC
Permalink
ngraham added a comment.


Is this about //generating// the thumbnails for the first time or //displaying// them?

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D14770

To: broulik, #dolphin, elvisangelaccio, #vdg
Cc: ngraham, kfm-devel, spoorun, navarromorales, firef, andrebarros, emmanuelp
Kai Uwe Broulik
2018-08-13 07:53:30 UTC
Permalink
broulik updated this revision to Diff 39554.
broulik added a comment.


- Use `stable_partition` so the order of elements is preserved

REPOSITORY
R318 Dolphin

CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D14770?vs=39525&id=39554

REVISION DETAIL
https://phabricator.kde.org/D14770

AFFECTED FILES
src/kitemviews/kfileitemmodelrolesupdater.cpp

To: broulik, #dolphin, elvisangelaccio, #vdg
Cc: ngraham, kfm-devel, spoorun, navarromorales, firef, andrebarros, emmanuelp
Kai Uwe Broulik
2018-08-13 07:54:02 UTC
Permalink
broulik added a comment.
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

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D14770

To: broulik, #dolphin, elvisangelaccio, #vdg
Cc: ngraham, kfm-devel, spoorun, navarromorales, firef, andrebarros, emmanuelp
Andres Betts
2018-08-13 08:00:32 UTC
Permalink
abetts added a comment.


What would be an example of this? Any graphics to see?

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D14770

To: broulik, #dolphin, elvisangelaccio, #vdg
Cc: abetts, ngraham, kfm-devel, spoorun, navarromorales, firef, andrebarros, emmanuelp
Nathaniel Graham
2018-08-13 08:02:26 UTC
Permalink
ngraham added a comment.


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.

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D14770

To: broulik, #dolphin, elvisangelaccio, #vdg
Cc: abetts, ngraham, kfm-devel, spoorun, navarromorales, firef, andrebarros, emmanuelp
Andres Betts
2018-08-13 08:05:03 UTC
Permalink
abetts added a comment.
Post by Nathaniel Graham
- 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?

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D14770

To: broulik, #dolphin, elvisangelaccio, #vdg
Cc: abetts, ngraham, kfm-devel, spoorun, navarromorales, firef, andrebarros, emmanuelp
Nathaniel Graham
2018-08-13 08:07:38 UTC
Permalink
ngraham added a comment.
Post by Andres Betts
Post by Nathaniel Graham
- 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.

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D14770

To: broulik, #dolphin, elvisangelaccio, #vdg
Cc: abetts, ngraham, kfm-devel, spoorun, navarromorales, firef, andrebarros, emmanuelp
Andres Betts
2018-08-13 08:08:30 UTC
Permalink
abetts added a comment.
Post by Nathaniel Graham
Post by Andres Betts
Post by Nathaniel Graham
- 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.
Awesome! :D

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D14770

To: broulik, #dolphin, elvisangelaccio, #vdg
Cc: abetts, ngraham, kfm-devel, spoorun, navarromorales, firef, andrebarros, emmanuelp
Kai Uwe Broulik
2018-08-13 08:14:01 UTC
Permalink
broulik added a comment.


Did you check the updated version with `stable_partition`? It makes the folders generate in the correct order as well.

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D14770

To: broulik, #dolphin, elvisangelaccio, #vdg
Cc: abetts, ngraham, kfm-devel, spoorun, navarromorales, firef, andrebarros, emmanuelp
Nathaniel Graham
2018-08-13 08:19:50 UTC
Permalink
ngraham added a comment.


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).

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D14770

To: broulik, #dolphin, elvisangelaccio, #vdg
Cc: abetts, ngraham, kfm-devel, spoorun, navarromorales, firef, andrebarros, emmanuelp
Kai Uwe Broulik
2018-10-10 14:04:06 UTC
Permalink
broulik abandoned this revision.

REPOSITORY
R318 Dolphin

REVISION DETAIL
https://phabricator.kde.org/D14770

To: broulik, #dolphin, elvisangelaccio, #vdg
Cc: abetts, ngraham, kfm-devel, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp
Loading...