Jump to content
We've recently updated our Privacy Statement, available here ×

VTD-XML datasource - fastest for big XML documents


edikk

Recommended Posts

I have wrote XML data source based on VTD-XML 2.0 (http://vtd-xml.sourceforge.net/

). It is fastest for XPath'es.

 

Example for my reports:

For exporting report using default jasperreports datasource it takes more then 20 minutes to export to PDF.

When I use xml datasource based on Jaxen, it takes 3 minutes.

And now, when I use VTD-XML it takes some less then 1 minute.

 

Mayby not everything can be done with VTD-XML, but for simple XPathes its enough.

 

In attached code there is some caching mechanizm. When XPath begin with "/" so I use it like a constant value for this XML file. I introduce this, because JR rerequest fields values from every report section (not only for detail section, but for header and footer too) every time, when it moved to the next record (next() function). For big XML documents it very carry weight!

 

Source in attachement, good luck :evil:

Regards

Edik [file name=WinVTDXMLDataSource.zip size=2039]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/WinVTDXMLDataSource.zip[/file]

Post edited by: edikk, at: 2007/04/30 14:05

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • 6 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...