Bug 174005 - Dolphin Blocks whilst trying to move large numbers of files
Summary: Dolphin Blocks whilst trying to move large numbers of files
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (other bugs)
Version First Reported In: 16.12.2
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Peter Penz
URL:
Keywords:
: 184784 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-01 01:12 UTC by Tiago Furtado
Modified: 2010-09-23 11:04 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tiago Furtado 2008-11-01 01:12:55 UTC
Version:            (using Devel)
Compiler:          gcc 
OS:                Linux
Installed from:    Compiled sources

Currently When I try to move large numbers of files dolphin blocks for some time. 

tested by moving ~800 files (from a folder with ~2000 files) totaling ~200 Mb to another folder with ~1000 files

Firstly what usually happens is that dolphin blocks and maxes out one of my cores. Then it starts responding and the files apparently are moved. immediately afterwards nepomuk maxes out a core (but doesn't block dolphin) and eventually returns to sleep. 

I also tried with fewer files and more files than specified above. The time that dolphin stays blocked seems dependent more on the number of files than total size of the files. 

This effect is more reproducible when moving files from folders with a lot of files to folders with lots of files.

If one is doing two file operations e.g. copying a large 300Mb file and also copying lots of files similar to the scenario above, the 300Mb operation also blocks (i.e. it completely stops as nepomuk and dolphin max out a core each at the same time). 

One other thing to note is that I'm using the redland backend and I've heard that is notoriously slow in comparison to sesame. Could that be causing these problems?

Please let me know if there is any more information that you require.
Comment 1 Daniel Winter 2008-11-04 06:47:14 UTC
Ok, I think here are two different issues. First to the Dolphin side (which I do not know much of): I heard about some bugfix to Dolphin/kio, not sure if that has been backported to 4.1, which should speed up file movement.  (Hopefully someone else nows more).

I know more about CPU usage of Nepomuk at that time. When moving files Nepomuk tries to move the Data it has about the files too.  For that it has to "look" if there is any data for the files you moved. That takes some time for every file. But that should not block Dolphin "only" use some CPU time.

And yes with Redland this is much slower. (on my System to check if there are Infos for a file takes a few ms each with sesame2, while with Redland it is more like 0.5 - 2 seconds.)

You could try to disable Nepomuk in the KDE settings and check if that also changes the Dolphin blocking (which should not be caused by Nepomuk). 
Comment 2 Peter Penz 2008-11-04 08:47:20 UTC
Thanks Daniel for clarifying the Nepomuk part, I can give some details for the Dolphin part: When selecting a lot of files in Dolphin while the Information Panel is open, the information panel asks Nepomuk for the rating + tags of each file. Especially with the Redland backend this is extremely slow and Dolphin got blocked several seconds. But even with another backend, a blocking is possible when having a cold disk cache. After discussing this with Sebastian Trüg (= Nepomuk maintainer) we came to the conclusion that we move this query for the metadata into a separate thread, so that Dolphin does not get blocked anymore. The fix was not trivial and hence not backported to KDE 4.1.x, but in KDE 4.2 Dolphin is never blocked anymore because of Nepomuk.

I've set this issue to FIXED, please feel free to reopen this issue if there are still performance issue in combination with Nepomuk. Thanks!
Comment 3 Tiago Furtado 2008-11-04 11:18:36 UTC
Ok, I have disabled nepomuk, However the problem still occurs. Dolphin still blocks for a while before initiating the move and still maxes one cpu doing something. Nepomuk cpu usage, as far as I could tell would only occur after the files were moved and didn't block dolphin. 
Comment 4 Tiago Furtado 2008-11-04 22:43:32 UTC
Hmm... tried the latest revision and the problem seems to be gone, in dolphin at least.
Comment 5 Peter Penz 2008-11-05 07:46:31 UTC
Thanks Tiago for testing :-)
Comment 6 Georg Wittenburg 2009-01-03 21:38:53 UTC
Could you have a second look at this bug? In 4.1.86 (using unofficial Debian packages from kde42.debian.net at version 4:4.1.86+svn902162-0r1), kio_trash maxes out one core when moving multiple directories to the trash. To reproduce, select multiple directories in Dolphin and press the Delete key. It just feels way to slow for such a simple operation given that I'm running an recent hardware.
Comment 7 Tiago Furtado 2009-01-04 02:13:41 UTC
Reopening the bug...for..Georg's sake :)
Comment 8 joel 2009-02-08 16:28:27 UTC
I'm having the exact same "move problem" on Suse. I just have one core to max out so things get pretty slow. If I kill Nepomuk there is a speed improvement, still on the slow side but much, much better.

A friend on KDE 4.2.0/Debian have the same problem with moving large number of files.

tested on:
Dolphin 1.2 (KDE 4.2.00 (KDE 4.2.0) "release 90.1", KDE:KDE4:Factory:Desktop / openSUSE_11.1)

Comment 9 Peter Penz 2009-02-08 18:41:21 UTC
I've added Sebastian (= Nepomuk maintainer) to CC.
Comment 10 Sebastian Trueg 2009-02-08 18:52:59 UTC
On KDE 4.2 all operations on Nepomuk side are done async, too.
Apart from that: if you are using the redland backend then I cannot give any support other than adding a warning in KDE 4.3 or simply making the sesame2 backend mandatory in kde 4.2.1.
Debian does not package sesame2 since it depends on Java.
You can check your backend via:
"qdbus org.kde.NepomukStorage /nepomukstorage org.kde.nepomuk.Storage.usedSopranoBackend"
Comment 11 joel 2009-02-08 22:19:31 UTC
Thanks for the info!
I was using the redland-backend. With redland disabled it is much faster. 
To test this bug try to move a couple of hundred megs of photos. (with redland enabled).
Couldn't test with sesame2. 
Comment 12 Tiago Furtado 2009-02-08 23:14:05 UTC
on suse, if you uninstall the redland backend and install sesame2 it automatically gets enabled. But you can't switch to it if you still have redland installed (sesame2 doesn't show up in sopranocmd).
Comment 13 Sebastian Trueg 2009-02-09 10:15:57 UTC
if redland and sesame are installed, Nepomuk should automatically choose the latter. That does not happen on SuSE?
Comment 14 Tiago Furtado 2009-02-11 00:08:17 UTC
apparently not. It's not even listed if redland is installed. Remove redland and it magically shows up (despite not being found before).
Comment 15 Peter Penz 2009-02-18 15:33:00 UTC
*** Bug 184784 has been marked as a duplicate of this bug. ***
Comment 16 Peter Penz 2009-03-01 19:15:14 UTC
*** Bug 185883 has been marked as a duplicate of this bug. ***
Comment 17 Peter Penz 2009-12-13 14:39:55 UTC
I've verified moving of 500 files (flat hierarchy) with around 1,1 GiB here on trunk (enabled Nepomuk, enabled tooltips, enabled Information Panel). Dolphin is blocked for ~0.5 seconds in this case. I tried also to copy 2600 files (269 MiB) and the blocking increased to around < 1 second.

I'm not sure how much room for improvements are left, but by reading through all the comments I'm unsure from which timespan you are talking. Does it block for several seconds in your case are is it in the range I'm talking (~ 0.5 seconds)? I think the goal should be at least < ~0.3 seconds...
Comment 18 Unknown 2009-12-13 16:42:10 UTC
I have not seen this behaviour recently, but that would say nothing as I did not explicitly try it out neither. 
The timespan on my computer when copy/pasting could use up several seconds (e.g. a very visible timespan) of "preparation time", wants to say time where kde is unresponsive and slow before the real copying starts.
Comment 19 Georg Wittenburg 2010-03-07 08:59:03 UTC
Seems to be fixed in 4.4.1. Thanks.
Comment 20 Mark 2010-09-19 03:30:57 UTC
Hi,

Please confirm that this issue is still present in that latest stable KDE version.

Thanx,
Mark
Comment 21 Georg Wittenburg 2010-09-20 11:01:19 UTC
Hi Mark,

Thanks for looking into this.


> Please confirm that this issue is still present in that latest stable KDE
> version.

Debian does not ship 4.5 yet and unfortunately I don't have the time to build 
from source. I'm afraid I can't help you with this at the moment.

Regards,

    Georg
Comment 22 Unknown 2010-09-20 11:20:32 UTC
Using KDE 4.5.00 /opensuse 11.3 I cannot reproduce my problem, eg. 10-20 seconds of blocking in preparation of copying. Seems to be fixed for me.
Comment 23 Peter Penz 2010-09-23 11:04:05 UTC
Thanks to all for retesting - I've set this issue to FIXED for 4.5.