KFileItem, mime types, and icons
David Faure
faure at kde.org
Tue Jun 11 18:52:09 BST 2013
Le vendredi 7 juin 2013 11:37:18 Frank Reininghaus a écrit :
> This sounds reasonable! And if the visible icons are fully determined
> in 200 ms, maybe we should use the remaining time to try and do a fast
> icon loading (without determineMimeType()) for all other items, to
> reduce the risk that the user ever sees "unknown" icons when
> scrolling.
Sounds good.
> But I think that even the time that we spend on fast icon loading must
> be limited, because "fast" icon loading in directories like
> /usr/include/ and /usr/lib/ takes several seconds here. Even in
> /usr/share/, which consists of 520 subfolders and only 4 files here,
> calling iconName() for all file items takes almost 6 seconds(!).
callgrind to the rescue :-)
> I'm wondering if something goes wrong there - it seems that "fast"
> icon loading is particularly slow for folders, even though I would
> expect that loading the plain folder icon should be relatively easy.
This is surprising indeed, given the cache in kiconloader. Needs profiling,
either with callgrind or the poor-man's profiler (interrupting gdb at random
points in time).
I'd love to do it, but not enough time this week.
--
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5
More information about the kfm-devel
mailing list