|
Comments
Did you read today's front page stories & breaking news?
SYS-CON.TV
|
Features A Study of XPath Performance in .NET Programming
Testing four different solutions
By: Huang Chang Hao
Jan. 2, 2009 07:15 AM
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:
Methodology
Timestamps were recorded at the beginning and end of each solution. Then, the time span for each solution was calculated. All this information was stored in a log file. A CPU usage history graph was captured to illustrate the difference between the solutions. Data analysis and extra study and research was conducted after each test was done and the data become available. Test Environment
Raw Data
//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
Test Result and Analysis Result of Each Solution All four solutions mean 100% CPU usage, but a dramatically different time to finish. I ran the test program twice. Table 1 illustrates the time used for each solution during the two runs.
Reader Feedback: Page 1 of 1
SOA World Latest Stories
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
|
SYS-CON Featured Whitepapers
Most Read This Week |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||