Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Optimising XPATH search performance

From: "Jonathan Chong" <noj0nathan@----.------->
To: NULL
Date: 12/3/2004 12:56:00 PM
> Does anyone know if there's a performance difference if this ID is an
> attribute or an element?

Have you personally do a test to find out the answer? Time stamp before and
after SelectSingleNode for searching your ID as attribute and element. If
you are using VC++, you can do something like this:

DWORD dwElapsedTime = GetTickCount();
....
SelectSingleNode(XPath)
....
dwElapsedTime = GetTickCount() - dwElapsedTime;
print out the value of dwElapsedTime variable to compare the performance.

"James Hahn" <JamesHahn@h...> wrote in message
news:e1ylfOO2EHA.3336@T......
> I am processing an XML file where performance is important. Most of the
> searching is for an element within the current node, but there is one
point
> where I have to do a SelectSingleNode from the document root, searching
for
> a unique ID, and I suspect this is a slow procedure.
>
> Does anyone know if there's a performance difference if this ID is an
> attribute or an element? Is there any optimising I can do to ensure the
> search is as efficient as possible?
>
> I could pre-process the file to de-normalize it, but for a typical data
set
> this about quadruples the size, and I fear that I will not get any overall
> speed improvement.
>
>




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent