|
From: Jimmy Z. <cra...@co...> - 2006-12-05 04:18:37
|
Mark, My comments below: ----- Original Message ----- From: "Mark Swanson" <ma...@Sc...> To: <vtd...@li...> Sent: Monday, December 04, 2006 7:00 PM Subject: Re: [Vtd-xml-users] Performance in comparison to libxml2 > Jimmy Zhang wrote: >> latest benchmarks >> >> http://vtd-xml.sf.net/benchmark.html > > Very impressive, as usual. > > I do have a concern/question: what is the overhead of XPath parsing in > these cases vs coding the queries in Java using the VTDNav class? I > think I remember you posting before that the overhead was negligible, > but I wasn't sure in what context or what circumstances this was the case. > XPath parsing is usually not a big overhead... XPath evaluation performance depends on the complexity of the XPath expression ... simple one (e.g. /*/*/* ) is pretty fast, complex ones, (//*) takes longer, it also has to do with the context of XPath eval. For relative Xpath, if the evaluation only iterates over the entire DOM tree, it will take longer than only evaluting it over a smaller sub tree... this applies to DOM as well as VTD-XML ... > If you have any additional comments in this regard I'd appreciate > reading them. In particular, if you had any performance tips using the > XPath evaluator that would be great. > We will update some of the articles on the website, also there is going to be an article for Javaworld in which XML MOdifier will be disucssed... > Also, I have just found out about XMLModifier. Do you have any example > code that shows how best to use this class? Not that it looks difficult > - I'm just incredibly lazy and just want to copy/paste code that sets up > the VTDNav and calls bind() appropriately. :-) > In the example code there is a directory named "update," in which you will find the example code of using XML Modifier > I couldn't find a way to create a masterDocument with a specific > character set or other prologue data...(mainly so I can just use > updateToken(int, String) ). > masterDocument is really an instance of VTDNav... the way to create one is to parse an XML document... Did I understand this part of your question? > It would also be interesting to see how well XMLModifier benchmarks > against xerces. The bechmark number combines XPath, paring and outputting. Outputting alone will be make the number look even better... > > Cheers. > > -- > http://www.ScheduleWorld.com/ > Free Google Calendar synchronization with Outlook, Evolution, > cell phones, BlackBerry, PalmOS, Exchange, Mozilla, Thunderbird, > Pocket PC/Windows Mobile. Also sync tasks, notes and contacts! > WebDAV, vfreebusy, RSS, LDAP, iCalendar, iTIP, iMIP support. > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Vtd-xml-users mailing list > Vtd...@li... > https://lists.sourceforge.net/lists/listinfo/vtd-xml-users > |