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

VTD XML - Buffer Reuse

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am planning to use the BufferReuse feature in VTD. I could find the following from different sources:
1) How to use?
2) A big picture of what it does?
I am trying to figure out what EXACTLY happens when I use BufferReuse.

Here is my problem statement:
I have close to 1000 XML files in my application, which will be loaded and parsed often. Like ~(10-20) times in a sec. So to optimize the code, the only way I can think of is, instead of parsing it again and releasing the object for garbage collection, I use BufferReuse. But if we retain 1000 instances of these XMLs in the buffer, do you foresee an issue in the server? Will it load the server too much? Where does it store these parsed objects?
The 1000 XML files could range from <1KB - ~1MB. Does the code internally have a maximum limit of the number of XMLs or collective size of XMLs that will be handled by BufferReuse feature?
This code will ultimately be deployed in a pretty robust server with very good specs. So kindly answer assuming best of the server specs in mind.
-arthi
 
Marshal
Posts: 28193
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
Hi Rt, welcome to the Ranch!

I don't understand why you have to know EXACTLY what happens when you use that option. Because your actual question, I think, is what difference it's going to make to your application compared to not using it. And it looks to me like you have a good set of test data already. So why not try your application code with and without that option, and see what difference there is?
 
Rt Raja
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Paul
We are working on POC and testing it. The intent of posting this question here is to find out if any body has faced similar dilemma while designing. Instead of learning it the hard way, I wanted to leverage the knowledge in this forum. My concern is: I have 1000 XML files which will range from less than 1KB to nearly 1MB. So, in run time assuming the worst case, I will have 1000 files with 1 MB each. Will BufferReuse store all of it? Or is it a better idea to implement custom cache feature.
If noone else has faced this ( which I doubt as, I think it is a a well trodden path in J2ee world), I will be more than happy to share my finding with the group when I get there
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic