Least CPU intensive way to constantly search xml files

  • Thread starter Thread starter Andy B
  • Start date Start date
A

Andy B

I need to make a program that stays in the xp/vista system tray. I have to
constantly search xml files to make sure the program stays updated with the
newest xml data. What is the least CPU intensive way to do this? Would it be
Timer or BackgroundWatcher?
 
Well i guess more info is required to answer this question ,

Where does the XML come from is it a feed ? or is it placed on a shared
network drive or or or ...... :-(

i myself am not such a big fan of timers in background processes , i am more
a thread sleep kind of progger or even bether a event driven
kind of progger ;-) .

regards


Michel Posseth [MCP]
http://www.vbdotnetcoder.com
 
The xml would be coming from the computers local drive. The xml would be
updated by some other source and then the program I am working on would need
to keep realtime updates from the xml files.


Michel Posseth said:
Well i guess more info is required to answer this question ,

Where does the XML come from is it a feed ? or is it placed on a shared
network drive or or or ...... :-(

i myself am not such a big fan of timers in background processes , i am
more a thread sleep kind of progger or even bether a event driven
kind of progger ;-) .

regards


Michel Posseth [MCP]
http://www.vbdotnetcoder.com




Andy B said:
I need to make a program that stays in the xp/vista system tray. I have to
constantly search xml files to make sure the program stays updated with
the newest xml data. What is the least CPU intensive way to do this? Would
it be Timer or BackgroundWatcher?
 
It seems that if something is changing a local file, then reacting to
filesystemwatcher events would be a resonable approach.

Andy B said:
The xml would be coming from the computers local drive. The xml would be
updated by some other source and then the program I am working on would
need to keep realtime updates from the xml files.


Michel Posseth said:
Well i guess more info is required to answer this question ,

Where does the XML come from is it a feed ? or is it placed on a shared
network drive or or or ...... :-(

i myself am not such a big fan of timers in background processes , i am
more a thread sleep kind of progger or even bether a event driven
kind of progger ;-) .

regards


Michel Posseth [MCP]
http://www.vbdotnetcoder.com




Andy B said:
I need to make a program that stays in the xp/vista system tray. I have
to constantly search xml files to make sure the program stays updated
with the newest xml data. What is the least CPU intensive way to do this?
Would it be Timer or BackgroundWatcher?
 
Indeed i would also go for the filesystem watcher as you then can make the
program event driven
thus , change in the file , the filesystem watcher will notify you and then
you reread the file

http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx

regards
Michel Posseth [MCP]
http://www.vbdotnetcoder.com




Family Tree Mike said:
It seems that if something is changing a local file, then reacting to
filesystemwatcher events would be a resonable approach.

Andy B said:
The xml would be coming from the computers local drive. The xml would be
updated by some other source and then the program I am working on would
need to keep realtime updates from the xml files.


Michel Posseth said:
Well i guess more info is required to answer this question ,

Where does the XML come from is it a feed ? or is it placed on a shared
network drive or or or ...... :-(

i myself am not such a big fan of timers in background processes , i am
more a thread sleep kind of progger or even bether a event driven
kind of progger ;-) .

regards


Michel Posseth [MCP]
http://www.vbdotnetcoder.com




"Andy B" <[email protected]> schreef in bericht
I need to make a program that stays in the xp/vista system tray. I have
to constantly search xml files to make sure the program stays updated
with the newest xml data. What is the least CPU intensive way to do
this? Would it be Timer or BackgroundWatcher?
 
Back
Top