• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

VTD XML buffer re-use

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working with VTD xml i have a question regarding buffered reuse feature of the VTD xml. What is the advantage of using buffered re-use feature of VTD xml. will ther be any change in memory used or change in performance? can anyone please elaborate on this ?
 
Marshal
Posts: 28304
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not surprisingly, the VTD site has something about buffer reuse:

http://vtd-xml.sourceforge.net/faq.html#What%20is%20Buffer%20Reuse
 
Venkata Pavan Kumar vemuri
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your reply...but it gives the definition of what buffer re usability is...buffer re-usability means The concept is to reuse LC and VTD buffer for XML parsing, instead of allocating every time....

I parsed some XML files using both setDoc and setDoc_BR methods. In my results, i observed that the performance(parsing time) of setDoc_BR is a little better than setDoc. What i'm faliing to analyze is how the buffer re-use concept is affecting the performance of the parser. For example, you want to parse and XML file. You take the file into a buffer(byte array) and assign it to an instance of VTDGen class using the setdoc or setdoc_br methods and parse the file. When you are parsing a single XML file, where does the concept of buffer re-use come?? Coz the one XML file is parsed once and VTD records are put in the buffer and that's it. If you have 2 XML files, the second XML file can re-use the buffer allocated by the application but when its just 1 file that is being parsed, why is the performance better??

If we think that the buffer allocated for the XML file is being re-used for holding the VTD records, what will happen when we want to modify or work with the XML file??Because VTD XML requires that the XML file is in memory. So it looks like that buffer cannot be reused.Can anybody figure out what exactly is going on here with buffer reuse??

Can you explain this concept to me?
 
Paul Clapham
Marshal
Posts: 28304
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would have thought the people at the VTD site were far more qualified to explain that. After all, I have just read the same paragraph that you read. Did you not try asking them? Did they not respond?
 
when your children are suffering from your punishment, tell your them it will help them write good poetry when they are older. Like this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic