10000 files in 3 hours is only about 1 per second (although obviously it might be burstier). I doubt that that would cause a problem for FileSystemWatcher
. Have you tried it?
I would be slightly concerned about how well a directory with 10,000 files in would perform anyway though - it probably depends on the file system. Are you able to move "processed" files to a different directory as you go?
Polling is certainly an option - although with both approaches, you'll need to be careful about how you handle new files, in case they're still being written. (One option is to write to a different directory and then atomically rename the file - or to use filename extensions for the same sort of effect, e.g. writing to foo.tmp
and then renaming to foo.txt
, and only processing .txt
files.)