Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / November 2006

Tip: Looking for answers? Try searching our database.

FileWatcher Multiple Unrelated Directories

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jon Turlington - 02 Nov 2006 17:10 GMT
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
Mattias Sjögren - 02 Nov 2006 22:44 GMT
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

Signature

Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.