polaris icon indicating copy to clipboard operation
polaris copied to clipboard

Replace periodic collection scan with filesystem watch

Open agersant opened this issue 8 years ago • 3 comments
trafficstars

Pending a more stable/bug-free version of https://github.com/passcod/notify or equivalent.

agersant avatar Jul 12 '17 05:07 agersant

I wonder if notify is less buggy enough now :smile:.

lnicola avatar Dec 28 '21 07:12 lnicola

Are you willing to take patches something like these two 1 & 2? They reduce the indexing time on my machine from 10minutes to 9 minutes and cpu usage is drastically reduced. (I can measure more accurate improvements if there is interest.)

1 - introduces background updating of the db 2 - introduces seek over current method of read and discard.

pmphfm avatar Dec 28 '22 05:12 pmphfm

Hello! I would be very curious to see measurements for how much of this 10% improvement comes from each change. I expect the seek change to be the big winner here, but it would also be very useful to learn that inserter work can be a bottleneck on some systems.

Changes I would requests for the PRs:

  • For the inserter changes, I would suggest splitting queue_flush into one function for directories and one for songs, removing the force flag and keeping the Vec length conditions in insert_item.
  • For the mp3 duration change, also bump version number (0.2.0), update the changelog, and the doc comment that only mentions Read as the only prerequisites
  • Difference in indexing time from cold disk (ie. power cycle computer, start polaris and measure initial indexing time) and hot (let indexing finish once, start indexing again, measure duration of that one)

Thank you for working on these! Indexing speed improvements always make my day.

agersant avatar Dec 30 '22 10:12 agersant