Revision 656b8e4...

Go back to digest for 7th August 2011

Optimization in KDE Base

Peter Penz committed changes in [kde-baseapps] /src/kitemviews:

Improve performance for creating previews

The overall time for creating previews is faster the more items
are passed to KIO::previewJob() in parallel instead of passing
e.g. only 100 items once and start several KIO::previewJobs
sequentially.

However in the worst case KIO::previewJob() might
block the application for several seconds if the
MIME-type of the passed KFileItems are unknown and e.g. 10000 items
are forwarded.

So KFileItemModelRolesUpdater will now take care to resolve as many
MIME-types as possible until a timeout is reached and will only pass
those items to KIO::previewJob().

For huge image folders, where the MIME-type can be determined very
fast, this means that the overall time for creating previews will
decrease without blocking the application. For "worst case" directories
where resolving the MIME-type can get very expensive this approach
assures no blocking of the user-interface although the overall time
until all previews are generated might slightly increase.

File Changes

Modified 2 files
  • /src/kitemviews
  •   dolphin/kfileitemmodelrolesupdater.cpp
  •   dolphin/kfileitemmodelrolesupdater.h
2 files changed in total