Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Optimising XPATH search performance [Thread Next] Re: Optimising XPATH search performanceTo: 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. > > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
