KFilterDev changes from KDE3

Martin Koller kollix at aon.at
Tue Mar 17 20:31:53 GMT 2009


On Tuesday 17 March 2009, David Faure wrote:

> > Well, I know the mimetype, but as I do a backup of a _lot_ of files,
> > isn't the overhead too high to again and again calling findFilterByMimeType() 
> > (as the mimetype will never change during the complete backup) ?
> 
> KFilterBase::findFilterByMimeType only loads a mimetype from ksycoca
> (that's supposed to be really fast, just a dict lookup and a bit of deserialization)
> and compares strings. If it really turns out to be a bottleneck, we could add
> a cache in KFilterDev so that it remembers the last requested mimetype
> and the KFilterBase that was created for it (with care not to leak or double-delete
> kfilterbases...). In any case this can and should be handled internally in KFilterDev.

I now run a first test:

~18000 files processed: KDE4 3:02 Minutes, KDE3 2:12 Minutes ...

It _is_ a bottleneck, as this was just a small test.

-- 
Best regards/Schöne Grüße

Martin    ()  ascii ribbon campaign - against html mail 
          /\                        - against microsoft attachments
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090317/30c8b02a/attachment.sig>


More information about the kde-core-devel mailing list