java - JasperReports: fillReport very slow -



java - JasperReports: fillReport very slow -

we have code generate pdf report, xml input. slow (2 hours process 280k rows; 10 minutes 70k rows, on solaris t5220).

documentbuilder docbuilder = docbuilderfactory.newdocumentbuilder(); fileinputstream filestream = new fileinputstream(rawxmlfile); ds = docbuilder.parse(filestream); map<string, object> params = new hashmap<string, object>(); params.put(jrxpathqueryexecuterfactory.parameter_xml_data_document, ds); params.put(jrxpathqueryexecuterfactory.xml_date_pattern, com.vodafone.gdsp.reporting.enums.xml.dateformat.date_format_iso8601); params.put(jrxpathqueryexecuterfactory.xml_number_pattern, "##0.##"); params.put(jrxpathqueryexecuterfactory.xml_locale, locale.english); params.put(jrparameter.report_locale, locale.uk); params.put("report_dir", jasperfile.substring(0, jasperfile.lastindexof("/"))); seek { virtpagesize = integer.parseint(reportconfig.getjaspervirtpagesize()); virtpagedir = reportconfig.getjaspervirtpagedir(); } grab (nullpointerexception npe) { logger.info("virtual page size , directory not assigned, using default value of virtpagesize {} , virtpagedir {}", virtpagesize, virtpagedir); } grab (exception ex) { logger.error("exception while fetching virtual page size , directory {}", ex.getmessage()); } logger.info("using jasper virtual parameters ({}, {})", virtpagesize, virtpagedir); jrfilevirtualizer virtualizer = new jrfilevirtualizer(virtpagesize, virtpagedir); jrvirtualizationhelper.setthreadvirtualizer(virtualizer); params.put(jrparameter.report_virtualizer, virtualizer); defaultjasperreportscontext context = defaultjasperreportscontext.getinstance(); jrpropertiesutil.getinstance(context).setproperty("net.sf.jasperreports.xpath.executer.factory", "net.sf.jasperreports.engine.util.xml.jaxenxpathexecuterfactory"); file jasperreport = new file(jasperfile); jasperprint jasperprint = jasperfillmanager.fillreport(new fileinputstream(jasperreport), params);

this include "use jaxen" property can see - there no difference observed in performance jaxen, , without jaxen. hence either "use jaxen" configuration have incorrect, or have different issue.

has else encountered , solved it? has got suggestions how determine problem? - have turned logging, logging not detailed, except when comes logging stuff @ detailed line-by-line level - nil says "i have seen 'use jaxen' directive , utilize jaxen" or along lines.

very much appreciated!

update: when run on laptop (a windows 7 system), 280k study runs in 16 minutes; when run same study xalan instead of jaxen on laptop, started @ 08:00, , 15:00, , has not completed; hence jaxen library need.

what not understand why there absolutely no difference when running on solaris 10, on t5220. dig ram , forth - perhaps there resource constraint. still appreciate suggestions if has encountered this.

i've same problem. xml of 330ko (2k rows), takes 9 800ms, , if utilize jaxen takes41 000 ms. wonder if current version jr 5.6.1 figer issue. if runs q xml wtih 11 114ko (65536 rows), takes 1.7hours! dom runs , takes lot memory. think may should changed method of parsing. sax: http://blog.synyx.de/2012/08/big-jasper-reports-with-custom-xml-datasource/

java performance jasper-reports

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -