! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Thunar is very slow to open /usr/bin
Status:
CLOSED: WONTFIX
Product:
Thunar-vfs
Component:
General

Comments

Description Olivier Ripoll 2006-09-13 08:11:40 CEST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
Build Identifier: 

I decided to compare the 0.40RC1 of Thunar (installed on top of the beta 2 of XFCE 4.4) and its competitors (Nautilus, Konqueror and Rox-Filer) on the opening time for /usr/bin, which contains a little more than 2300 files on my pc. Times were measured by counting. I did the test twice, with similar results.
I do not know if this slowness of Thunar is known, so I report it. From what I had heard, I was expecting it to be faster than its competitors.




Reproducible: Always

Steps to Reproduce:
1. open /usr/bin in Thunar and competitors
2. count time for the file view to display something
3. count time for disk activity to stop
4. scroll and observed the responsivity

Actual Results:  
Thunar (and Rox to a lesser extent) are much slower than Nautilus and Konqueror:

1- Konqueror: after 1-2 seconds of latency with a blank file view, Konqueror displays the opened folder after less than 3 seconds. No more background work is needed, scrolling is effective without any disk usage or latency.

2- Rox: Rox seems to have a double-pass system. The folder is accessible and can be scrolled/browsed after 2-3 seconds, but heavy work goes one for 12-16 seconds. This heavy work seems to have no real effect actually. It can be cancelled by a "cancel" button at the bottom of the window.

3- Nautilus: Heavy work goes on for 8-10 seconds, but after that, everything is responsive with no more disk access. (Not sure of the following:) The file view is responsive directly after the click to open the folder, so apart from the disk working hard for 8-10 seconds, Nautilus could look to be even faster than Konqueror.

4- Thunar: The file view is blank for 22-24 seconds until the end of the disk activity, and even after, scrolling is not instant (icons 'appear' while scolling).


Expected Results:  
Thunar should be faster on an old machine than others, or at least as fast.

My machine is an 6+ years old PC (Athlon 600 MHz, 640 MiB RAM, Mandriva LE 2006)
XFCE beta2 and Thunar are installed via the installers, compiled with optimisations. Competitors are rpm installs. GTK 2.8.11, Glib 2.8.1.
Comment 1 Benedikt Meurer editbugs 2006-09-13 11:47:49 CEST
It's because Thunar implements the suggested way to determine the mime type of files. And since /usr/bin usually contains only binaries, where Thunar needs to open the file to know the real mime type, this can be slow on first time. Atleast Nautilus used to do this as well, but that changed at some time, and now Nautilus determines the real type when you select the file, which makes the icon change and a weird dialog pops up when you try to open certain files telling you that the guessed and the real mime type don't match. To avoid this confusion, Thunar implements the spec properly.

ROX should have been fixed recently as well. Atleast version 2.5 now also determines the real mime types, and is somewhat slower than Thunar.

KDE 3.x doesn't implement the shared mime database spec, so that cannot really be compared. KDE 4.x will implement it.

The "slowness" for binary-only folders is not really an issue, because (a) /usr/bin does not really include files a typical user will want to work with on a daily basis, and (b) stability and usability is way more important for Thunar than the ability to open /usr/bin in 2 seconds.
Comment 2 Olivier Ripoll 2006-09-14 09:02:07 CEST
I extended the comparison to other directories. One with 10000 .txt files (all of O byte). Here are the results for the record:
- Thunar: 10 s to display something, 14 s to finish all work
- Nautilus: 6 s to display a view, 15 s to have all icons and scrollbars
- Konqueror: 5 s (for a view with icons and scrollbars), and 8 s to end all activity
- Rox-Filer: 4 s (a view with scrollbars), 20 s to have all icons correct (with the cancel button displayed at the bottom and the weird activity going on until 1 min 15 s).

I also used a directory full (>6000) of small images (a copy of the .thumbnails/normal directory). Results are similar, to open the view. Of course, thumnbail loading (or generation) makes them different at some point. Nautilus (gnome 2.12 on LE 2006 IIRC) only renders the view when it has loaded all thumnails, which makes it much slower, however it is the fastest when the goal is to have all thumbnails displayed.
Comment 3 Benedikt Meurer editbugs 2006-09-14 12:12:33 CEST
Hm, those are pretty good times for Thunar. Afterall it's the fastest file manager with only 14s (as said KDE3 is a different story, as it doesn't use the shared mime database and as such there's no meaningful comparison possible as the KDE mime database may contain totally different rules, so Konqueror is out). Atleast slightly faster than Nautilus (dependending on the version of Nautilus, it'll not open empty files at all, something we could do in Thunar as well, which would make it go down to Konqueror's times probably). Afterall, tho, a directory of empty files is as useless as a directory of binaries for the common case, and Thunar is optimized for the common case (tho, as can be seen, it does a pretty good job even in uncommon cases).

I've copied 3000 files from my ~/.thumbnails/normal/ to a folder (with ls -l folder and cat folder/* > /dev/null to ensure both meta data and content is hot). Thunar displayed the directory instantly (from warm cache and after a dry run to generate the thumbnails for the thumbnails) while Nautilus took approximately 5s and ROX nearly a minute. But loading speed is not even that interesting here. More interesting is the data memory consumed by the file manager after loading(!) the folder:

 - ROX     125060 kB
 - Nautilus 98364 kB
 - Thunar    5592 kB

Who said ROX is near lightweight or fast? It's slower than Nautilus (in this special case!) and wastes a LOT more memory. Imagine 120MB writable data memory wasted (not to mention the bad effects on the cache), and all you wanted to do was to open the file named "mypicture.jpg"?

BTW: Are you sure that you started all file managers from either cold or warm cache? Otherwise the numbers are useless.
Comment 4 Olivier Ripoll 2006-09-14 13:50:57 CEST
I did the image test with both warm and cold cache. By cold cache, I mean I rm -f the .Thumbnails/normal directory, then launched the file manager. Results differ because the thumnail generation was quite an heavy task, but Konqueror and Rox results are similar. Nautilus (this is an old Nautilus, I am using Mandriva LE2006) needed 1 min 20s from warn cache and 2 min 35s from cold cache. It sounds bad, but when compared to Konqueror, it actually is not that bad: 2 min 40s from warn cache, 7 min from cold cache. However, Konqueror is usable after 5 s only, the rest being the loading / or generation of the thumbnails, while Nautilus is not usable at all until it has finished the thumbnail loading. Thunar was not easy to measure. It was actually not generating all the thumbnails from cold cache or loading from warm cavche, only some. Scrolling to a view with non-generated icons was restarting the process. After 16 minutes, I stopped with about 50% of thumbnails generated. Rox was like for the text test, but needed 13 minutes to generate all thumbnails.
Comment 5 Benedikt Meurer editbugs 2006-09-14 13:58:05 CEST
No. Cold cache is right after system startup. (Mostly) empty disk cache, etc. Warm cache = hot disk cache, folder content and metadata cached.

Bug #2310

Reported by:
Olivier Ripoll
Reported on: 2006-09-13
Last modified on: 2010-11-07

People

Assignee:
Jannis Pohlmann
CC List:
2 users

Version

Version:
unspecified

Attachments

Additional information