Bug 262282 - Dolphin gets very slow when hovering over icons after trying to open a deleted directory with a picture & after opening a directory containing several jpegs & subdirectories
Summary: Dolphin gets very slow when hovering over icons after trying to open a delete...
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 4.6
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-06 09:25 UTC by Mahendra Tallur
Modified: 2012-02-10 08:40 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mahendra Tallur 2011-01-06 09:25:00 UTC
Version:           unspecified (using KDE 4.5.4) 
OS:                Linux

This bug is 100% reproducible here : after deleting a directory which contains a picture, with previews enabled, and trying to go back using the Dolphin "back" button, Dolphin gets very slow and takes time to recover completely even after rebooting.

Reproducible: Always

Steps to Reproduce:
Steps, that do work from a clean user account :
1) set up Dolphin to show files previews
2) create a new directory
3) copy a jpg picture to it (one is enough)
4) open the directory with Dolphin
5) select the parent directory (with the history bar for instance)
6) put the directory to the bin
7) click on the "back" button to return to the directory
8) Dolphin shows a blank directory and displays an error message as it doesn't exist anymore
9) go "back" again
10) close Dolphin
11) open Dolphin again
12) move the mouse over icons to check whether the problem occurs

Actual Results:  
When moving the mouse over icons, they take more time than usual to highlight. For instance, if you open a directory that contains many files, if you leave the mouse over an icon and scroll down, you will notice the scrolling is significantly slower than usual. If you leave the mouse in a blank area, it will be perfectly smooth. The problem remains even after rebooting. After some time, it sometimes disappears completely or partly.

Expected Results:  
Highlighting icons / scrolling in a directory when leaving the mouse on icons should be perfectly smooth, as it is before performing the steps or as it is when logging in with a clean account.

Please try to reproduce it with a clean test account, as you may have problems reverting to the normal state. (it is my case : it is still slower than it should be, even if it is faster than just after performing the steps)

This happens indeed from a blank account, even without desktop effects, and even without Nepomuk.

Please note I am using : Kubuntu 10.10 i386, Kubuntu PPA with KDE 4.5.4, nvidia 9800M GTX, Core2Duo 2*3Ghz.

Also note : any other operation in Dolphin or any other piece of software is still as fast as before. Only moving the mouse over icons gets slow (in any view, with & without previews).
Comment 1 Mahendra Tallur 2011-01-06 09:53:17 UTC
Oops : there IS one additional step required.

Each time I reproduced it, I also opened ONCE the pictures directory on my main account (from the new user account), that contains many subdirs (about 100) with many pics (about 50 / subdir). This generated a lot of previews. 

Then I performed the steps above, from the same account, that is to say : create a directory with a couple of pictures, go to the parent dir, delete it, go back, see the error message, close & reopen dolphin. (note I enabled previews and the same settings for each directory)

With all those steps, it is 100% reproducible here.
Sorry for the mistake.

Please tell me, if you don't manage to reproduce it, if you want some sample pictures that do work each time.
Comment 2 Peter Penz 2011-01-06 10:40:37 UTC
Thanks for the detailed report, but I could not reproduce the issue. Do you have enabled tooltips or the Information Panel? Do you use "[x] Use common view properties for all folders"? It would be great to have steps to reproduce the issue with one dolphin instance from one account. Creating previews for folders can be quite expensive...  I cannot imagine that the problem persists after "rebooting" (the computer?) - did you probably mean "restarting Dolphin"?
Comment 3 Mahendra Tallur 2011-01-06 11:03:41 UTC
Thanks for the reply, Peter. 

- Tooltips are disabled (default under Kubuntu)
- The information panel is enabled (default as well)
- I do use "Use common view properties for all folders" (changed value)

Actually, the only settings I changed are :
- use common view properties
- thumbnails enabled

The rest is a new clean KDE account. The only problem with my bug report is that it implies to first generate some thumbnails when browsing the other user's directory from the new user account : so I will try to gather some sample files that do trigger the problem and put them online for you.

Yes, even after restarting the whole OS, the problem remains. It usually eventually disappear, but I have no clue why / how. Actually, at the moment, Dolphin is still a little slow after many reboots. Not as slow as just after performing the steps but slower than usual.

BTW, what distro & KDE version do you use ? I may also find the time to test this under a LiveCD of your distro.

Cheers & thanks a lot !
Comment 4 Mahendra Tallur 2011-01-06 11:43:43 UTC
Okay, I came up with a better way of reproducing the bug.

1) download this sample archive which contains about 50 jpeg pictures (clones of the same actually) : http://mahen.free.fr/sample.tar.gz (upload over in 10 minutes)
2) extract it to a blank USB key
3) create a new user account
4) log in
5) create a blank directory in your home dir and put one of the aforementioned pictures here
6) open the USB key, move the mouse over the files
7) open the directory you created (with one pic inside)
8) open its parent directory with the history bar
9) put the directory to the trash
10) click on the "back" button
11) you get an error message saying the directory doesn't exist anymore 
12) close this error message, click on the parent directory with the history bar
13) close all instances of Dolphin
14) open a new instance of Dolphin
15) move the mouse over some icons : it should be definitely slower than usual (except if you have an extremely fast computer, maybe ?) To witness the pb even more, you may now open a directory with many files and scroll through the files while leaving the mouse on some icons : it should be very jerky
16) the problem may or may not disappear after some time / reboots / or something else I haven't figured out yet

Please note : you do not even have to modify any Dolphin setting. In my case, there was no preview enabled, actually !! I assumed it was related, but it wasn't. (just the Kubuntu defaults with single click, contextual information on the right)

Please tell me if it helps ! If it doesn't, I can try with another distro of your choice...
Comment 5 Peter Penz 2011-01-06 11:59:22 UTC
Thanks, I tried this but everything is as fast as before (and I've a slower computer than you ;-)). Could you also please specify what you mean with "slow": Do you mean that the preview in the Information Panel is shown with a larger delay than usual or do you mean that the blue hovering-animation above the icon is somehow slower?

Is this problem only reproducible with a new user account? In this case the explanation might be quite easy: When creating an initial preview of a JPEG (or any other file) Dolphin requires to read the whole file and must decode it and shrink it for the preview. This can be quite timeconsuming (e.g. your JPEGs are around 3 MB each, so hovering one icon means to read 3 MB from a cold disk cache). After the preview has been created once, it gets cached under ~/.thumbnails as a quite small file. If you hover the file a second time, it can be generated/read a lot faster.

So in your case the issue just seems to be that you hover a file where the preview has not been cached before and hence is slower.
Comment 6 Mahendra Tallur 2011-01-06 12:16:18 UTC
Thanks again for trying this, Peter.

Well, I guess you would definitely notice if you had the issue. I'll double check if it happens in a Chakra LiveCD. What distro / KDE version do you use ?

1) it happens even after all thumbnails were generated & cached. 
2) it happens in both a new account and an existing account I've been using for weeks
3) it happens even when the information pane and previews are disabled !
4) there's no high CPU usage when it occurs. It happens even with desktop effects disabled

When I say slow...
1) I don't refer to the time required to display the preview or information panel
2) I refer to a) the "hover" effect (blue square around the icon when the mouse flies above it) that is instant and extremely smooth usually, and gets jerky when the problem occurs. b) the scrolling inside directories : usually, when you leave the mouse pointer above an icon, and scroll using the mouse wheel, the animation is almost as smooth as when using the "elevator" (don't know the English term : I mean, the vertical bar on the right). When the problem occurs, it gets very jerky, you can feel the animation is not smooth, as a movie file that would lose many frames. It makes browsing less pleasant and slower.


What is strange is that I absolutely don't understand what would be the link between trying to display a deleted directory and the hovering animation :-) I'll check in Chakra and come back in a couple of minutes.
Comment 7 Peter Penz 2011-01-06 12:24:47 UTC
> What distro / KDE version do you use ?
Kubuntu 10.04, KDE SC 4.5.4 + trunk

> 2) I refer to a) the "hover" effect
> b) the scrolling inside directories

Hm, this sounds more like a graphics-driver related issue as the performance of the hovering effect + scrolling depends on that. The connection to deleting the directory is very strange and as you say that rebooting the computer does not help I'm quite sure the relation is "per accident". Did you check on the system monitor whether there is a process that consumes some time? I currently doubt this is the case, but just to be sure. Could you check whether changing the widget style might help? I've heard from some strange NVidia related issues in combination with Oxygen - they should be solved for 4.6 (and in my case they don't seem to appear in 4.5 too) but probably the whole issue is triggered by this. Using a simple style like Plastique might be a good choice for testing... Thanks!
Comment 8 Mahendra Tallur 2011-01-06 12:26:55 UTC
I forgot also to specify that, *once the problem is there* :

1) the "delay" in the "blue hover animation" / scrolling while hovering icons is "constant". It is exactly the same delay whatever the directory is. It can be a directory that contains 10 files or 1000 : same delay.

2) after a reboot the problem usually disappears (sometimes even without rebooting, I don't know why). In my case, there is still a slight delay after several reboots, but it sometimes disappears completely, and comes back a bit later. So we should just focus on the "acute" symptoms, which make Dolphin significantly slower just after repeating the steps.
Comment 9 Peter Penz 2011-01-06 12:40:31 UTC
Does the problem also occur in the file-open dialog (e.g. when using kwrite and opening a file)? To reproduce please assure:
- That the file dialog is maximized to fullscreen
- To increase the icon-size to a similar size like used in Dolphin
Comment 10 Mahendra Tallur 2011-01-06 13:03:36 UTC
Indeed, there is an animation delay (lag) in the "open file" dialog when moving the mouse cursor above icons. Even with the default small size.

I have this problem ATM with my main account. I have some trouble reproducing it with a new account now, though, and I didn't manage to reproduce it in the Chakra LiveCD. My steps seemed reliable (I reproduced it 5 times this morning) but are probably not sufficient... I will try again to find more reliable steps.

BTW, it also happens with compositing disabled. Cannot say without the proprietary drivers because the "nouveau" driver is too slow anyway, here, to notice the issue.
Comment 11 Mahendra Tallur 2011-01-06 13:12:03 UTC
I'm really sorry, but since I remove / reinstalled the nvidia proprietary driver, I cannot reproduce the issue anymore in a new account. I'm really sorry, it seems to work each time before.

But my main account still had a slight delay (not as much as immediatly after triggering the issue). And it is indeed visible not only in Dolphin but in the "open file" dialog, even with small icons and with the preview disabled. 

I double checked : with a new user account, this open file dialog is perfectly smooth & fast, with not animation delay at all.
Comment 12 Mahendra Tallur 2011-01-06 13:35:15 UTC
Peter : Switching from Oxygen to Plastique makes no difference, by the way.
Comment 13 Peter Penz 2011-01-14 21:16:47 UTC
(closing as WORKSFORME after discussing this per e-mail)
Comment 14 Mahendra Tallur 2011-06-14 11:00:15 UTC
Peter, there is a more general issue about the "hover animation" in Dolphin in the KDE file selector that happens about 50% of the time. It still happens as of today, with KDE 4.6.3 + latest nvidia drivers (Archlinux), even in "raster mode".

Everything is top smooth, but, half of the time, when moving the window over icons (in Dolphin / file selector), the display is slowed down significantly, which makes, for instance, scrolling with the mouse wheel, or selection *very* slow. (I have a Core2Duo + nvidia 9800GTX GPU).

Shall I open a new bug about this ? I'm pretty puzzled no one seemed to report this, since I have some quite standard HW. It's happened for several KDE releases already.

Cheers & thanks again for your great work :-)
Comment 15 Mahendra Tallur 2011-06-14 11:02:22 UTC
Sorry for the typo : first line should be :
... in Dolphin AND the KDE file selector ...
Comment 16 Peter Penz 2011-06-14 11:23:51 UTC
> Shall I open a new bug about this?

Not necessary, I've just reopened this bug again.

> I'm pretty puzzled no one seemed to report
> this, since I have some quite standard HW.

This is really strange... I've a new computer now and also an NVidiaGTX but don't observe this issue (using Open-Suse).

In 4.8 Dolphin will get a new view-engine that is a lot faster in general but I don't know whether it solves this issue.
Comment 17 Peter Penz 2011-06-14 11:24:57 UTC
(internal note: as the issue seems to occur in the file-dialog too it might be KFileItemDelegate related)
Comment 18 Mahendra Tallur 2011-06-14 12:20:29 UTC
Peter : I opened a thread on the official Nvidia forum about this. I got a first answer from another affected user and I invited him to come & discuss here. 

http://www.nvnews.net/vbulletin/showthread.php?t=163447

Peter, do you use a 64 bits or 32 bits version of OpenSUSE ? What GFX board do you use ? Do you use the Raster or OpenGL mode of QT ?

Cheers :-)
Comment 19 Peter Penz 2011-06-14 12:49:11 UTC
> Peter, do you use a 64 bits or 32 bits version of OpenSUSE ?

64 bit

> What GFX board do you use ?

NVidia Geforce GTS 450 (no GTX as wrongly mentioned above); installed proprietary NVidia-drivers

> Do you use the Raster or OpenGL mode of QT ?

Raster
Comment 20 Mahendra Tallur 2011-06-22 15:00:56 UTC
Hmm, meanwhile, nvidia drivers got updated to the 275.09.07 version. I'm pretty sure (as it was quite some time ago, already) that the slowness of the hover effect got significantly less prominent.

It's clearly not perfectly smooth, but it got really acceptable. I wonder what changed exactly in this driver, but there were a couple of KDE-specific optimizations lately.
Comment 21 Mahendra Tallur 2012-02-09 20:04:27 UTC
I'm very happy to say that this bug is definitely fixed in KDE 4.8, thanks to the amazing Dolphin rewrite. Great work Peter, thanks !!!!
Comment 22 Peter Penz 2012-02-10 08:40:38 UTC
Thanks for your feedback, great to hear that 4.8 resolved this for you :-) The 2.0 release of Dolphin in 4.8 is still quite rough, but we did already fix a lot of things for 4.8.1 which should make some things even smoother...