Hi,
> Do you think is better to read the values from the xml file each time I call the ping method (say
> once per second) or should I retrieve the values from the file and store them in a Array or
> Arraylist or whatever?
That all depends on the number of elements.
If the number is quite large then you may want to cache portions in memory, but not the entire
thing. (i.e., run a timer to release memory that hasn't been used recently)
If the number is small then just store the contents in memory.
The distinction between large and small amounts depend on the capabilities and amount of memory of
the computers that will be running your application. If you know the capabilities ahead of time it
should make your decision much easier.
> Which of the two is the better performing way?
Memory will perform much better.
> I guess if I create Arrays I'll use much more memory but if have to read through the xml structure
> each time this would be processor consuming. Is that right?
Yes, and not just the processor, but I/O as well; meaning that your HDD will be quite busy serving
up data for ping requests once per second. You could optimize this by pulling out only the
appropriate data each time without scanning or reading the entire document, but since it's XML that
will probably be very difficult for you.

Signature
Dave Sexton
> Hi Guys, I'm developing an application that sends ICMP echo requests (ping) via the .net Ping
> Class. I've some informations related to the network such as IP addresses,Urls,SiteNames and so
[quoted text clipped - 10 lines]
> create Arrays I'll use much more memory but if have to read through the xml structure each time
> this would be processor consuming. Is that right?