One day, I received an e-mail from a customer complaining that there was 100%
CPU occupancy on our program, EDC (Engineering Data Collection) service,
while handling certain XPath queries. Well, that specific XPath was really a
bit complicated as you can see:
//CDResults[../../../TargetName/@Value=//SiteInformation[TargetName/@Value!=//SiteInformation[1]/TargetName/@Value
and
TargetName/@Value!=//SiteInformation[TargetName/@Value!=//SiteInformation[1]/TargetName/@Value][1]/TargetName/@Value][1]/TargetName/@Value]/BottomCD/@Value
I decided to do some tests on the program and some other alternative
solutions. I set two goals for this test:
To verify if the XML parser is the part causing 100% CPU usage. If so, to try
to find alternative solutions for better performance.
Metho... (more)