After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 524363 - thumbnails jump around while being generated or loaded
thumbnails jump around while being generated or loaded
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: Views: Icon View
3.26.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 562114 711044 780551 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-03-25 19:31 UTC by Jean-François Fortin Tam
Modified: 2021-06-18 15:56 UTC
See Also:
GNOME target: ---
GNOME version: 3.23/3.24


Attachments
demonstration screencast (610.09 KB, application/ogg)
2008-03-27 00:37 UTC, Jean-François Fortin Tam
Details

Description Jean-François Fortin Tam 2008-03-25 19:31:05 UTC
in some cases with existing thumbnails in a folder, nautilus jumps around frantically while generating or displaying thumbnails.

Did something change regarding thumbnails between 2.20 and 2.22?

This happens even if the listing is sorted by Name, as shown in the attached videos:

@ 30 seconds: http://jeff.ecchi.ca/public/nautilus%202.22%20thumbnails%20jumping%201.ogg
@ 1 minute: http://jeff.ecchi.ca/public/nautilus%202.22%20thumbnails%20jumping%202.ogg
Comment 1 Jean-François Fortin Tam 2008-03-27 00:37:09 UTC
Created attachment 108095 [details]
demonstration screencast

here is a shorter screencast that exhibits the behavior. Images appear out of nowhere in front of one another, even though they are supposed to be sorted by name. Please confirm?
Comment 2 A. Walton 2008-03-27 03:07:27 UTC
What's going on here isn't that they're jumping around while generating, it's that when we enumerate a directory with a lot of files, Nautilus only gets about a hundred of them at a time, and Nautilus displays them as soon as possible. The underlying system gives us no guarantee that they'll all be loaded in the order that we want to sort them in, so between the rounds of loading, it may have an item that needs to be sorted higher up in the container, which causes things to "jump around".

I'm not sure really how we're going to be able to fix it, or even if it's really a bug and not "just the way it works". The only other thing I can think of is just waiting until the load is finished to sort all of the items in the icon container, but that might just trigger the opposite bug ("hey, all of the items are loading but they're not in order until the load is finished!"), and I'm not sure it's any better behavior-wise. Maybe we can make this less noticeable with some tweaking?
Comment 3 Jean-François Fortin Tam 2008-03-27 04:23:52 UTC
but... this used to work fine before 2.22 (or I would have not noticed that there was a change), so it is possible, I would think.

Anyway, especially in this case where the sorting is by file name, I would say that something is wrong. Surely nautilus does not pick 100 files at a time using a random technique? I mean, why can't it do something like os.listdir and then sort those names before displaying? At least it seems like it did in 2.20?
Comment 4 Cosimo Cecchi 2009-03-08 00:45:56 UTC
*** Bug 562114 has been marked as a duplicate of this bug. ***
Comment 5 Kieran Clancy 2009-05-16 07:46:29 UTC
It's not random, it's the order that the filesystem stores the files. Do an `ls -lf somedir` and you'll see that the filesystem doesn't return the files in any particularly sorted order.

There are two issues here:
1) It can take a long time to list a large directory, particularly over a network. If no files are shown until it completes then the user may get frustrated. It is better to start displaying a partial listing after a short delay. The current behaviour is correct in this regard.

2) Nautilus looks up thumbnail indexes while reading the folder contents. This means that for almost every file, nautilus pauses while checking to see if it has a thumbnail, and displays it if it does. This makes loading a large directory of photos painfully slow. This is the bug. Instead of finishing the read of the directory contents, it keeps asking the disk to spin to random places and read thumbnail pngs. Nautilus should finish loading the directory completely, just showing placeholders for thumbnails until it finishes. When done, it should begin to check for and generate thumbnails, starting with the files currently being displayed in the window. This is what gthumb does, and it is blazingly faster than nautilus at displaying a directory with 100 photos.

This is summarised nicely by the suggestion in bug 562114 :
When a folder is opened, display placeholder thumbnails _before_ attempting to
look up pre-generated thumbnails.
Comment 6 Marco Lazzaroni 2009-11-04 07:17:01 UTC
I agree with Kieran: when a folder is opened, placeholder thumbnails should be displayed before attempting to look up pre-generated thumbnails.
This new behaviour would solve the problems pointed out by A.Walton and would provide more efficiency (less not needed disk accesses).
Comment 7 Marco Lazzaroni 2009-11-05 10:08:09 UTC
I gave a look at the code. It looks like that such a modification is not really simple, at least for me ;-)
Comment 8 António Fernandes 2017-08-23 14:26:51 UTC
*** Bug 711044 has been marked as a duplicate of this bug. ***
Comment 9 António Fernandes 2019-09-21 16:37:25 UTC
*** Bug 780551 has been marked as a duplicate of this bug. ***
Comment 10 André Klapper 2021-06-18 15:56:03 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org (resources are unfortunately quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version of Files (nautilus), then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/nautilus/-/issues/

Thank you for your understanding and your help.