Summary: | KIO::copy or KIO::move too slow if list of files is long | ||
---|---|---|---|
Product: | [Unmaintained] kio | Reporter: | Eduard <karbofos> |
Component: | general | Assignee: | David Faure <faure> |
Status: | RESOLVED NOT A BUG | ||
Severity: | normal | CC: | ahartmetz, karbofos |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Eduard
2011-08-14 20:03:08 UTC
Please don't mix several issues in one report. The third problem sounds like it might be an actual KDE bug, but there are not enough details. I'm about to fix a bug that slows down processing several tens of thousands of files due a bad algorithm using too much CPU time, so forget about that one if you have it. Generally though, on traditional harddisks it is perfectly normal that reading many small files is much slower than reading one large file, due to files being scattered on the disk, which requires (slow) disk seeks. Git commit 2cd2d1a4cfa1226f959047bd4a0a429382056f19 by Andreas Hartmetz. Committed on 21/09/2011 at 04:03. Pushed by ahartmetz into branch 'KDE/4.7'. Undo manager: Don't prepend() to a QVector which can contain many, many items. Use a QList instead. A QStack is a QVector, which has an O(n) prepend method. Conceptually it is a stack, but not always used like one, so I haven't renamed the typedefs, so the code looks a bit (more) confusing now. Sorry about that. I noticed that copying several 100k files slowed down to just a few files a second and found that most of the time was spent in QVector<KIO::BasicOperation>::prepend(), called from KIO::CommandRecorder::slotCopyingDone(). Another problem is memory usage, which was a few hundred megabytes. This patch does not fix memory usage because I have a lot of memory and it's a difficult problem :) BUG: 257907 BUG: 258497 CCBUG: 280088 M +9 -9 kio/kio/fileundomanager.cpp M +2 -2 kio/kio/fileundomanager_p.h http://commits.kde.org/kdelibs/2cd2d1a4cfa1226f959047bd4a0a429382056f19 |