D17200: Avoid writing unchanged data to terms dbs

Stefan BrĂ¼ns noreply at phabricator.kde.org
Tue Nov 27 20:17:04 GMT 2018


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

REVISION SUMMARY
  The termlist returned from replaceTerms may be identical to the current
  DB contents. Avoid blowing up the write transaction by commits which are
  actually noops. CPU cycles are cheaper than disk writes and flushes.
  
  Comparing old and new terms is typically cheap (adding or removing files
  changes the term list size). File updates often do not change the terms
  for all DBs, e.g. a rename changes the ctime and also triggers an update
  of the XAttr entry and vice versa. Appending to a file or doing any other
  action which changes the mtime triggers a DocumentTermsDB update, while
  the set of unique terms may be unchanged.

TEST PLAN
  ctest

REPOSITORY
  R293 Baloo

BRANCH
  submit

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

AFFECTED FILES
  src/engine/writetransaction.cpp

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


More information about the Kde-frameworks-devel mailing list