D27765: [FileContentIndexer] Remove duplicate condition check for loop break

2020-03-04 Thread Stefan Brüns
This revision was automatically updated to reflect the committed changes.
Closed by commit R293:ed8cdf3d32f1: [FileContentIndexer] Remove duplicate 
condition check for loop break (authored by bruns).

REPOSITORY
  R293 Baloo

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D27765?vs=76733&id=76981

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

AFFECTED FILES
  src/file/filecontentindexer.cpp

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


D27765: [FileContentIndexer] Remove duplicate condition check for loop break

2020-03-04 Thread Nathaniel Graham
ngraham accepted this revision.
ngraham added a comment.
This revision is now accepted and ready to land.


  Oh so it does!

REPOSITORY
  R293 Baloo

BRANCH
  submit

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

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


D27765: [FileContentIndexer] Remove duplicate condition check for loop break

2020-03-04 Thread Stefan Brüns
bruns added inline comments.

INLINE COMMENTS

> filecontentindexer.cpp:69
>  #else
>  if (idList.isEmpty() || m_stop.loadRelaxed()) {
>  #endif

@ngraham - you mean this condition, which comes immediately after?

REPOSITORY
  R293 Baloo

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

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


D27765: [FileContentIndexer] Remove duplicate condition check for loop break

2020-03-04 Thread Nathaniel Graham
ngraham added a comment.


  Hmm, changing the loop to `while (true)` would seem to reduce some safety if 
none of the break conditions are reached.

REPOSITORY
  R293 Baloo

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

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


D27765: [FileContentIndexer] Remove duplicate condition check for loop break

2020-03-01 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
  Counting the number of files to be indexed (m_provider->size()) can
  be significantly more costly than checking if the next batch is empty.
  Also the m_stop condition was checked twice.

REPOSITORY
  R293 Baloo

BRANCH
  submit

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

AFFECTED FILES
  src/file/filecontentindexer.cpp

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