┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphindockwidget.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-08-02 19:47:06 +0200
committerPeter Penz <[email protected]>2011-08-02 19:54:39 +0200
commit8ea76d0a0e67fbf03de5c2a10a77077b8fe51c08 (patch)
tree5e5f29a5bd07a099b4893f8ea3cc334790d9dd06 /src/dolphindockwidget.cpp
parent94f3320444b9243bf52e4578ca9043fa690c5e4c (diff)
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.
Diffstat (limited to 'src/dolphindockwidget.cpp')
0 files changed, 0 insertions, 0 deletions