> On Sept. 1, 2015, 6:12 p.m., Stefan Brüns wrote: > > src/file/timeestimator.cpp, line 47 > > <https://git.reviewboard.kde.org/r/125004/diff/2/?file=399878#file399878line47> > > > > No more reason to split this in two for loops, as it is guarded by > > m_estimateReady. > > > > Maybe put the weights into an array in a static class member. > > > > The totalWeight is also a const value now.
That was guarded before as well but in a different place. The loop was split because we needed to iterate over the array in order of recentness of the time, first loop went from current index (which is the oldest batch) to the end of the array and the other one from the beginning to the currentIndex to iterate in increasing order of recentness. Now that I look at it, can be done in a single loop, will update the patch. I've not made the total weight a const in case we decide to change the BUFFER_SIZE. - Pinak ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/125004/#review84723 ----------------------------------------------------------- On Sept. 1, 2015, 11:42 a.m., Pinak Ahuja wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/125004/ > ----------------------------------------------------------- > > (Updated Sept. 1, 2015, 11:42 a.m.) > > > Review request for Baloo and Vishesh Handa. > > > Repository: baloo > > > Description > ------- > > * Previously the m_batchTimeBuffer could be read while it was being written > to by another thread. > * Now only a single thread (the main thread) deals with m_batchTimeBuffer > avoiding the above mentioned situation. > > > Diffs > ----- > > src/file/filecontentindexer.h 186eb35 > src/file/filecontentindexer.cpp 5a504b1 > src/file/fileindexscheduler.h c30f358 > src/file/fileindexscheduler.cpp dcf45f8 > src/file/timeestimator.h 68253f9 > src/file/timeestimator.cpp b9fefcb > src/tools/baloo-monitor/monitor.cpp 4b0148e > > Diff: https://git.reviewboard.kde.org/r/125004/diff/ > > > Testing > ------- > > Querying for remaining time seems to working from baloo-monitor. > > > Thanks, > > Pinak Ahuja > >
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<