polaris
polaris copied to clipboard
Replace periodic collection scan with filesystem watch
Pending a more stable/bug-free version of https://github.com/passcod/notify or equivalent.
I wonder if notify is less buggy enough now :smile:.
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.
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_flushinto one function for directories and one for songs, removing theforceflag and keeping the Vec length conditions ininsert_item. - For the mp3 duration change, also bump version number (
0.2.0), update the changelog, and the doc comment that only mentionsReadas 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.