D15959: Wait for the extraction process to finish before scheduling

Igor Poboiko noreply at phabricator.kde.org
Fri Oct 12 08:34:03 BST 2018


poboiko added a comment.


  In D15959#339523 <https://phabricator.kde.org/D15959#339523>, @bruns wrote:
  
  > This works for me:
  >
  >    void FileIndexScheduler::scheduleIndexing()
  >    {
  >   -    if (m_threadPool.activeThreadCount() || m_indexerState == Suspended) {
  >   +    if (m_indexerState == Suspended) {
  >            return;
  >        }
  >
  
  
  That might require some changes in the scheduling logic. Right now it will behave weirdly.
  If we do this change, there might be situations where bunch of i.e. `ModifiedFileIndexer` gets pushed to queue in a row. For example, we were inside `FirstRunIndexer`, and 10 files were modified.
  Even worse, if will have a single new file and then 10 modified files - it will push 10 `NewFileIndexer`s.

REPOSITORY
  R293 Baloo

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

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


More information about the Kde-frameworks-devel mailing list