Replace individual file and directory scan with inotifywait or similar #18

Open
opened 2026-08-24 08:30:22 +02:00 by vlw · 0 comments
Owner

The current approach which uses a simple directory tree walker to scan files and directories for changes take forever, it also puts an insane load on the harddrives I use while the scan is running. We should investigate if a tool like inotifywait can be used instead.

We can limit the number of active "listeners" by waiting for the first write, modify event to a target directory. The target directory will be marked as modified in the configuration file, the listener will be removed, and the directory will be archived when the next upload cycle begins. We don't need to know which or how many files have been modified, all we care about is that a file was modified since the last run.

The current approach which uses a simple directory tree walker to scan files and directories for changes take forever, it also puts an insane load on the harddrives I use while the scan is running. We should investigate if a tool like `inotifywait` can be used instead. We can limit the number of active "listeners" by waiting for the first write, modify event to a target directory. The target directory will be marked as modified in the configuration file, the listener will be removed, and the directory will be archived when the next upload cycle begins. We don't need to know which or how many files have been modified, all we care about is that _a file_ was modified since the last run.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
vlw/3rd#18
No description provided.