martins.tuga Posted July 23, 2013 Share Posted July 23, 2013 I'm loading JasperPrint file and it's taking about 2 seconds to load a 60KB file.My code is:String jpXML = .....;[/code]InputStream is = new ByteArrayInputStream(jpXML.getBytes("UTF-8")); [/code]JasperPrint jp2 = JRPrintXmlLoader.load(is); //This is taking 2 seconds[/code]Does anybody know how to speedup this? The problem seems to be in the XML Digester...Thanks Link to comment Share on other sites More sharing options...
recepientisabsent Posted July 24, 2013 Share Posted July 24, 2013 Try to use this way instead: JasperPrint jp2 = JasperCompileManager.compileReport(JRXmlLoader.load(is)); Link to comment Share on other sites More sharing options...
martins.tuga Posted July 24, 2013 Author Share Posted July 24, 2013 Thanks for your suggestion, but i'm already loading a JasperPrint not a JRXML content, so I can't load it with JRXmlLoader. Link to comment Share on other sites More sharing options...
recepientisabsent Posted July 24, 2013 Share Posted July 24, 2013 Ok. One time I have noticed that report was slowly generated for the first time but repeated generations was faster. And second I faced a problem with slow rendering of a report when it had element with position type=Fix relative to bottom, but it was a complex report. Link to comment Share on other sites More sharing options...
martins.tuga Posted July 24, 2013 Author Share Posted July 24, 2013 PROBLEM SOLVED!! The JasperPrint load felt from 2000 miliseconds to 10 miliseconds. I've just updated this dependency from: <dependency>[/code] <groupId>xerces</groupId>[/code] <artifactId>xercesImpl</artifactId> [/code] <version>2.10.0</version>[/code]</dependency>[/code] To <dependency>[/code] <groupId>xerces</groupId>[/code] <artifactId>xercesImpl</artifactId> [/code] <version>2.11.0</version>[/code]</dependency>[/code] So there might be some performance issue with the version 2.10.0 of this lib. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now