• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

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 ?
 
Sheriff
Posts: 28344
97
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
Sheriff
Posts: 28344
97
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?
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic