preview in dolphin is slow with many pictures
Mathias Kraus
k.matze at gmx.net
Wed Jun 11 21:34:06 BST 2008
Peter Penz schrieb am Wednesday 11 June 2008:
> On Tuesday, 10. June 2008 23:25:30 Mathias Kraus wrote:
> [...]
>
> > > I've just submitted a patch which resolves this issue. When the user
> > > scrolls down, the generating of previews is paused and resumed again
> > > for the new visible area. I've tested it with 1000 items and it seems
> > > to work very well.
> >
> > There is no change for me. I rebuild KDE in release mode, but when
> > preview is switched on, I have a delay of several seconds. If I switch
> > preview off, the delay is still there until I leave and then enter the
> > folder again, then it is really fast. You can try it for example in
> > /usr/bin, there are usually also many files.
>
> It works very well here with folders having a lot of images (> 1000
> images), but I agree that turning on previews in /usr/bin is a huge problem
> (I was not aware about this). I guess this is an issue in kdelibs
> PreviewJob, where it is timeconsuming to retrieve the MIME-type from the
> files in usr/bin...
Hmm, maybe I need to delete my build directory and try it again.
> In opposite to Gwenview Dolphin tries to create previews for each
> MIME-type.
>
> > > In opposite to Gwenview Dolphin also created previews for the invisible
> > > items in background.
> >
> > Is it maybe possible to move it into an other thread, or just disable the
> > preview creation if number of items is bigger than x?
>
> It is already done this way. The previews are generated by a different
> thread and the user interface is (at least in the case of image previews)
> not blocked. The creating of previews is paused as soon as the user touches
> the scrollbars.
I think I really need to delete the build directory and try it again :)
> > I also noticed, that
> > the CPU is very high, when dolphin creates the previews.
>
> Sure, creating/loading 1000 previews is resource intensive :-)
>
> > Best regards,
> > Mathias
> >
> > > Please note that when testing it in trunk that due to the debug mode
> > > the performance of previews in general is quite slow. E. g. when I
> > > suspend the previews when touching the scrollbar I've a small delay,
> > > which does not occur in the release mode.
> > >
> > > Best regards,
> > > Peter
> > >
> > > > Is it possible to do it in dolphin the same way and shall a fill a
> > > > report on b.k.o?
> > > >
> > > > Thanks, Mathias
Peter Penz schrieb am Wednesday 11 June 2008:
> On Wednesday, 11. June 2008 02:13:02 Peter Penz wrote:
> [..]
>
> > It works very well here with folders having a lot of images (> 1000
> > images), but I agree that turning on previews in /usr/bin is a huge
> > problem (I was not aware about this). I guess this is an issue in kdelibs
> > PreviewJob, where it is timeconsuming to retrieve the MIME-type from the
> > files in usr/bin...
>
> Update: I just checked how Dolphin for KDE 4.0 behaves in this regard.
> There I just pass the URLs of the items to the PreviewJob and before the
> job is started, Dolphin gets blocked too for a few seconds...
>
> I'll do some profiling if I have more time again, I hope I can find a
> solution for KDE 4.1.
>
> BTW: can you confirm in your environment that when going into a folder with
> e. g. 1000 images that no blocking of the GUI occurs?
It still blocks the UI for several seconds, but I'm rebuilding kdelibs and
kdebase to test if it's the fault of my system.
Can anyone else confirm Peter that preview doesn't block the UI?
If someone needs some images, execute the following script. It takes a while,
but after that you have 2000+ images
#!/bin/bash
for((jahr=2000; jahr<=2008; jahr++))
do
for((monat=1; monat<=9; monat++))
do
for((tag=1; tag<=9; tag++))
do
wget http://www.sinfest.net/comikaze/comics/$jahr-0$monat-0$tag.gif
done
for((tag=10; tag<=31; tag++))
do
wget http://www.sinfest.net/comikaze/comics/$jahr-0$monat-$tag.gif
done
done
for((monat=10; monat<=12; monat++))
do
for((tag=1; tag<=9; tag++))
do
wget http://www.sinfest.net/comikaze/comics/$jahr-$monat-0$tag.gif
done
for((tag=10; tag<=31; tag++))
do
wget http://www.sinfest.net/comikaze/comics/$jahr-$monat-$tag.gif
done
done
done
Thanks, I really appreciate your effort.
> Thanks!
> Peter
>
> > In opposite to Gwenview Dolphin tries to create previews for each
> > MIME-type.
>[...]
More information about the kfm-devel
mailing list