D21578: [UnindexedFileIterator] Delay mimetype determination until it is needed

Stefan BrĂ¼ns noreply at phabricator.kde.org
Tue Jun 4 15:14:15 BST 2019


bruns created this revision.
bruns added reviewers: Baloo, ngraham, astippich, poboiko.
Herald added projects: Frameworks, Baloo.
Herald added a subscriber: kde-frameworks-devel.
bruns requested review of this revision.

REVISION SUMMARY
  The mimetype is only required if all the other checks pass, i.e. when
  the file has been modified or added.
  
  It is beneficial to swap the order of timestamp and mimetype checks, as
  the mimetype determination is much more expensive than the timestamp
  retrieval, and the mimetype filter will only reject files occasionally
  while the mtime filter will reject files most of the times.
  
  Skip the mimetype determination for directories which would return
  wrong results anyway, either "application/octet-stream" or even
  "text/plain" for a directory named "test.log".

REPOSITORY
  R293 Baloo

BRANCH
  submit_unindexed

REVISION DETAIL
  https://phabricator.kde.org/D21578

AFFECTED FILES
  src/file/unindexedfileiterator.cpp
  src/file/unindexedfileiterator.h

To: bruns, #baloo, ngraham, astippich, poboiko
Cc: kde-frameworks-devel, LeGast00n, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, bruns, abrahams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190604/d3d59494/attachment.html>


More information about the Kde-frameworks-devel mailing list