bestfastest way to find values of a element in a xml file

As @Sinatr mentions. Profiling should always be the first step when investigating performance.

A reasonable guess about what takes time would be

  1. IO
  2. Parsing

IO could be improved by getting a faster disk, or caching results in RAM. The later may greatly improve performance if multiple searches are done, but introduces issues like cache-invalidation.

According to “What is the best way to parse (big) XML in C# Code” XmlReader is the fastest way to parse xml. This blog suggest XmlReader is about 2.5 times faster.

If you have multiple files you could also try to process multiple files in parallel. Keep in mind IO is mostly serial, so you might not gain anything unless you have a SSD that can deliver data faster than files can be processed.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top