]> cloud.milkyroute.net Git - dolphin.git/commit
KFileItemModelRolesUpdater: waste less ressources and fix some bugs
authorFrank Reininghaus <frank78ac@googlemail.com>
Wed, 5 Jun 2013 21:31:01 +0000 (23:31 +0200)
committerFrank Reininghaus <frank78ac@googlemail.com>
Wed, 5 Jun 2013 21:31:01 +0000 (23:31 +0200)
commit2bdc5eff541c1e60fa197750e6aa73cee116beac
treedaa87c9002b7afb7adfb20229e97bf6b0eb144ae
parentc6494823c8b79a33bf333a1e3a2c58ac6d74dcea
KFileItemModelRolesUpdater: waste less ressources and fix some bugs

The main change in this commit is that we do not determine expensive
roles (like previews, mime types, etc) for all items, but only for the
visible ones and those close to the visible area or on the first and
the last page of the view.

This prevents that the CPU and hard drive are kept busy for quite some
time after entering a folder while all items are handled asynchronously.

There is one known problem at the moment: when sorting by "Type" or
another role that can be resolved by KFileItemModelRolesUpdater, the
icons of the visible items are sometimes not loaded while the sorting is
still in progress. I will try to fix this issue during the next few
days.

REVIEW: 110839
src/kitemviews/kfileitemmodelrolesupdater.cpp
src/kitemviews/kfileitemmodelrolesupdater.h