471,349 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,349 software developers and data experts.

system.IO: alternatives to fileSystemWatcher approach

hiya,

I am using a fileSystemWatcher to monitor a directory.When files are
inserted into the dir, I process them, via a call to my
"processAlllDirFiles" method.

If there is going to be a lot of file activity, is it better to perhaps use
a timer ( to decrease the frequency of times that my "processAlllDirFiles"
method is called?)...Or, do I just wait and see how I go regrding
performance?

All suggestions welcone ;-)

cheers,
yogi

--
Message posted via http://www.dotnetmonster.com
Jul 21 '05 #1
1 3018
hi chris,

I have had a slight performance hit when i tried to call some function on
change of every file, the way i handled it was like this,
I had a counter or something similar, I call a function "XYZ()" for
processing after a couple of files are changed, say i check for some 25 times
the filesystemwatcher is invoked then once the number reaches my max limit i
call a function to process my changed files.

Hope this helps you,
Kannan.V

"chris yoker via DotNetMonster.com" wrote:
Community Message Not Available

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Josh Usovsky | last post: by
3 posts views Thread by Michael Stanbrook | last post: by
7 posts views Thread by Allen Anderson | last post: by
2 posts views Thread by Jack David | last post: by
1 post views Thread by chris yoker via DotNetMonster.com | last post: by
2 posts views Thread by John Talli | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.