in reply to read directory, fork processes
One addition I would make to ikegami's post, is when doing your file discovery process in the main thread, rename the files into a work directory before queuing the new name. If the target of rename is on the same disk, it will take very little time regardless of the size of the file and will keep the arrivals directory clear of known files, greatly simplifying the next phase of the discovery process.
Also, if you can make the the final (post-processing) destination (the backup location), on another drive, that will help with disk head thrash. But don't rename them there immediately, as that would require a copy operation and slow thing down again.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: read directory, fork processes
by roboticus (Chancellor) on Feb 24, 2010 at 12:13 UTC | |
by KevinBr (Acolyte) on Feb 24, 2010 at 22:34 UTC | |
by roboticus (Chancellor) on Feb 25, 2010 at 12:30 UTC |