FileWatcher Multiple Unrelated Directories

J

Jon Turlington

I have a Windows Service that I use to watch for certain files of
certain sizes being created in directories. When the file size is of my
specified size a SQL connection is made to determine if any action
should be taken. The problem is that this puts an extremely high load
on the server at times. I believe it would be more efficient to know
which directories in the tree are supposed to have this action taken
rather than having to hit the SQL server so often.

My Questions:

1. Would it be more efficient to create a multitude of FileWatchers to
watch each directory individually?

2. Is it possible to specify many paths on a single watcher?

3. Any got any ideas to reducing the load signifigantly?

Thanks In Advance!

Jon Turlington
 
M

Mattias Sjögren

Jon,
1. Would it be more efficient to create a multitude of FileWatchers to
watch each directory individually?

I don't think so but the best way to tell is to try it.

2. Is it possible to specify many paths on a single watcher?

No, only a single common parent directory and include watching
subdrectories.

3. Any got any ideas to reducing the load signifigantly?

Cache as much data as possible on the client to reduce the number of
hits to the SQL server.


Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top