Comments
Yakov Fain wrote: @roche It looks like you didn't get my message and analogies. I know that Apple simply doesn't want Flash Player on iPhone regardless of how good/bad the product is. I also know that Adobe has good engineers, but I don't see that they have much support from the management. By support I mean providing enough resources for delivering software of superb quality. Your statement about "internal assessments of Adobe's management by its own engineers" is great, but show me the money. Why in the world does it take two years to release the next version of Flex? Inadequate funding. Why Adobe...
Cloud Computing
Conference & Expo
November 2-4, 2009 NYC
Register Today and SAVE !..


2008 West
DIAMOND SPONSOR:
Data Direct
SOA, WOA and Cloud Computing: The New Frontier for Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
GOLD SPONSORS:
Appsense
User Environment Management – The Third Layer of the Desktop
Cordys
Cloud Computing for Business Agility
EMC
CMIS: A Multi-Vendor Proposal for a Service-Based Content Management Interoperability Standard
Freedom OSS
Practical SOA” Max Yankelevich
Intel
Architecting an Enterprise Service Router (ESR) – A Cost-Effective Way to Scale SOA Across the Enterprise
Sensedia
Return on Assests: Bringing Visibility to your SOA Strategy
Symantec
Managing Hybrid Endpoint Environments
VMWare
Game-Changing Technology for Enterprise Clouds and Applications
Click For 2008 West
Event Webcasts

2008 West
PLATINUM SPONSORS:
Appcelerator
Get ‘Rich’ Quick: Rapid Prototyping for RIA with ZERO Server Code
Keynote Systems
Designing for and Managing Performance in the New Frontier of Rich Internet Applications
GOLD SPONSORS:
ICEsoft
How Can AJAX Improve Homeland Security?
Isomorphic
Beyond Widgets: What a RIA Platform Should Offer
Oracle
REAs: Rich Enterprise Applications
Click For 2008 Event Webcasts

Now more than every there is pressure on IT to offer higher levels of service and a greater degree of availability all while cutting back on costs. As such, making sure your technology environment is efficient and effectively managed is absolutely essential. The data center, by its very nature, i...

SYS-CON.TV
A Study of XPath Performance in .NET Programming
Testing four different solutions

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:

  1. To verify if the XML parser is the part causing 100% CPU usage.
  2. If so, to try to find alternative solutions for better performance.

Methodology
A test program was built to implement four different solutions but achieve the same functionality, which was to retrieve the value of a given XML based on a certain XPath query. The four solutions included the current implementation in the EDC service and three alternatives. The major difference among these four solutions was:

  • Solution 1: Implements XmlDocument and XPathNavigator.Evaluate
    This was the current implementation in EDC service.
  • Solution 2: Implements XPathDocument and XPathNavigator.Evaluate
  • Solution 3: Implements XPathDocument and XPathNavigator.Select
  • Solution 4: Implements XmlDocument.Select

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

  • Desktop Computer: Dell OptiPlex GX270
  • CPU: Intel Pentium 4 / 2.8GHz
  • RAM: 1G
  • Windows 2000 Professional v5.00.2195
  • Service Pack 4 Build 2195
  • .NET framework 1.1 v1.1.4322 SP1
  • Visual Studio 2003 v7.1.6030

Raw Data
The source code can be downloaded from here.

  • XML file: see VeritySEM_WAFER_REPORT_5.xml
  • XPath query string:

//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

  • Dummy Large XML: see testBigXML.zip

Test Result and Analysis
CPU Usage
The CPU occupancy rose to 100% immediately after the test application started. It could confirm that the 100%-CPU-usage issue is caused by the XML parser (see Figure 1).

Result of Each Solution
All four solutions ran correctly and got the same result: 9.161745E-02. So all the solutions are workable.

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.

  1. Time format is HH:MM:SS
  2. First run ran under Visual Studio debug mode
  3. Second run ran after the program was compiled as a standalone executable.

About Huang Chang Hao
Huang Chang Hao is a senior software engineer working at Qimonda IT Suzhou Ltd., Co. His main expertise is semiconductor FAB automation software, Equipment Integration and Manufacturing Execution System.

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

SOA World Latest Stories
Faced with high in-house deployment, management, and support costs for its mission-critical enterprise applications, enterprises are turning to the cloud for its economic efficiencies and speed of deployment. But moving to the cloud requires some up-front planning and careful considera...
Cloud Computing Journal caught up with the CEO of a major new player in the fast-emerging Cloud ecosystem - a CEO who has taken an interesting and unusual decision. While signing up as the Platinum Plus Sponsor of the 5th International Cloud Expo, he and his company have decided to rem...
Novell broke its 18-day silence late Saturday morning and rejected the unsolicited $5.75-a-share offer to take the company private that Elliott Associates plunked on the table March 2. Novell wants more money. Bearing in mind that Novell currently has close to a billion dollars i...
NaviCloud is a next-generation platform that combines the economic efficiencies of cloud computing with true enterprise-class reliability and security. With built-in high-availability, a state of the art operations center, and a highly resilient service delivery infrastructure spanning...
Dell is suing Sharp, Hitachi, Toshiba, Seiko Epson and HannStar in district court in San Francisco for fixing the price of LCDs and overcharging since 1996. It wants treble damages. Bloomberg repeats the suit’s observation that Sharp and Hitachi admitted overcharging Dell in a plea agr...
SYS-CON Events announced today that VirtuDataCenter, a cloud computing network infrastructure company, will offer a complete turnkey alternative to today’s cloud computing solutions. They will exhibit at SYS-CON's 5th International Cloud Expo (www.CloudComputingExpo.com), which will ta...
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


SYS-CON Featured Whitepapers
ADS BY GOOGLE