D28933: [Coding] Avoid recurrent detach and size checks

2020-04-18 Thread Stefan Brüns
This revision was automatically updated to reflect the committed changes.
Closed by commit R293:680b75a9a61a: [Coding] Avoid recurrent detach and size 
checks (authored by bruns).

REPOSITORY
  R293 Baloo

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D28933?vs=80437=80492

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

AFFECTED FILES
  src/codecs/coding.cpp

To: bruns, #baloo, ngraham
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, 
fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams


D28933: [Coding] Avoid recurrent detach and size checks

2020-04-18 Thread Nathaniel Graham
ngraham accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R293 Baloo

BRANCH
  submit

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

To: bruns, #baloo, ngraham
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, 
fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams


D28933: [Coding] Avoid recurrent detach and size checks

2020-04-17 Thread Stefan Brüns
bruns created this revision.
bruns added reviewers: Baloo, ngraham.
Herald added projects: Frameworks, Baloo.
Herald added a subscriber: kde-frameworks-devel.
bruns requested review of this revision.

REVISION SUMMARY
  QVector::append() is quite expensive, as each access checks if the array
  needs to be detached or has to grow. Resizing the array and setting
  the elements with an iterator is significantly faster.

TEST PLAN
  valgrind --tool=callgrind baloosearch the_test.txt

REPOSITORY
  R293 Baloo

BRANCH
  submit

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

AFFECTED FILES
  src/codecs/coding.cpp

To: bruns, #baloo, ngraham
Cc: kde-frameworks-devel, hurikhan77, lots0logs, LeGast00n, cblack, 
fbampaloukas, domson, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams