Re: Making nautilus faster with large directories



Hi Thomas,

El lun, 06-12-2004 a las 09:46 +0100, Thomas Vander Stichele escribi� Hi,
> 
> 
> > I sent this mail to nautilus-list proposing an optimization that should
> > make the situation a lot better but got no answer:
> > http://mail.gnome.org/archives/nautilus-list/2004-November/msg00074.html
> > 
> > This should be considered for 2.10.  Any thoughts?
> 
> The thing you mention about gthumb doing this exact thing is precisely
> why I dislike this idea.  gthumb's behaviour when it comes to thumbnails
> is the SINGLE MOST ANNOYING[1] thing about the program.

Not as annoying as nautilus with cached images.

>   In short, my
> CPU time is meant to be used.  Any second my CPU is not doing a 100% is
> processor time I paid for that got wasted.  Especially if I have to
> *scroll down* to make the program actually thumbnail what I want to
> preview.
> 
> What's the point of previewing if the previews are not ready for me to
> watch ? If the program is currently not doing anything, and it has work
> left to do to provide me a good and fast UI experience that doesn't
> waste my time waiting for stuff that should already have been done, it
> should GO ON AND DO IT.

You have a good point of view.  The key here, like you said, is a fast
UI experience.

I took some time measures and I got interesting data.  Let's see...

My system configuration:
- CPU: AMD Athlon XP 2000+ (Real speed: 1662.502 in /proc/cpuinfo)
- RAM: 512 MB

Test case:
- 2208 images, 685 MB in total.  All in one directory (ext3 FS)
- Distro: Fedora Core 3 with updated kernel (and other official updates)

The swap was never touched during the test.  The system was monitored
with top refreshing every second and gkrellm.

I was running Evolution in the background and listening music with
rhythmbox.  The sound was good all the time.


Test 1 - Viewing the directory for the first time (no cache)
- Total time: 300 segs.
- CPU utilization: 70% - 90%
- Disk utilization: 1 - 4 MB/seg

Test 2 - Vewing the directory for the second time (cache)
- Total time: 38 segs.
- CPU utilization: 50% - 80%
- Disk utilization: 2 - 5 MB/seg (Disk intensive)

Test 3 - Viewing the directory for the third time (cache)
- Total time: 22 segs.
- CPU utilization: 100%
- Disk utilization: 0 - 300 KB/seg (basically none)

Now, the first test, although much longer, was the best UI experience
because it showed the files during the process and I was able to see
what it was doing, I got feedback.  Nautilus gives priority to the files
that the user is seeing so they are previewed first.  In fact, I think
nautilus is very very good in this scenario since I can start seeing the
images the very first second I open the directory.

The others two tests shows the annoying problem with nautilus.  They are
executed a lot faster but only after nautilus finishes, the files are
shown on the screen.  So the user, during 22 - 38 seconds, got _NO_
feedback and one might think that nautilus got blocked or something...
got my point?  This is what I want to improve.

So, like others said in this thread, it is good to thumbnail the whole
directory in background once the files shown in the screen are displayed
first.  Which is true right now as shown in test 1.  But it is not the
case with cached images.  What if I have more images?, what if my
computer were slower?  I don't want to wait until the end to get the
result.  This is not a fast UI experience.

Now, there is a little difference between test 2 and test 3.  In test 2
it reads from disk even more than test 1 (from the cache I assume) but
uses less CPU.  Test 3, seems to be getting the info cached in memory or
something because it doesn't read the disk but uses the CPU 100% all the
time.

I hope this info helps,


-William





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]