SReview
SReview copied to clipboard
use inotify in sreview-detect
The detect_files script currently is expected to run from cron, and will then parse all files that pass the input glob. As more data is being generated, this becomes more and more inefficient.
A more efficient way of doing this would be to:
- Check all files on startup and update the database with their metadata
- Set up inotify event listeners for "someone wrote to a file and closed it then" in the correct directories
- Wait for the inotify events to fire
- If the inotify events fire and the name of the files match our input glob, update the database with their metadata
@krokodilerian, do you think it is worth prioritizing this for FOSDEM 2018, or should I not bother?
I don't have data how much time it took to process the directories, but even for the size of FOSDEM I don't think it's worthy. It's a nice idea, though.