Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Report Emitter performance very slow
hkseeram
We have J2EE application running on JBOSS7.1.1Final integrated with BIRT 3.7.2 via spring frame work. Our reports outputs to Excel, Word, PDF, HTML and PPT. We created a singleton for Report Engine/Platform and just use the same report engine every time we run a report in mutli threaded environment.
We are noticing that when we stress out the application BIRT emitters writing the data to output file very slow. When we bounce JBOSS we notice normal behavior. But as we increase the number of reports run we notice the emitter performance degrade even though we're only at about 25% CPU intensive.
Any idea what cause the performance degrade? This is a show stopper for us to go live.
I appreciate for your help.
Here is the code we are using:
public void start() {
if (log.isDebugEnabled()) {
log.debug("Starting Eclipse BIRT platform");
}
try {
Platform.startup(engineConfig);
} catch (BirtException be) {
throw new IllegalArgumentException("Failure starting BIRT platform", be);
}
}
public IReportEngine getReportEngine() {
if (reportEngine == null) {
if (log.isDebugEnabled()) {
log.debug("Creating new instance of report engine.");
}
reportEngineFactory = (IReportEngineFactory) Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
reportEngine = reportEngineFactory.createReportEngine(engineConfig);
}
return reportEngine;
}
public void executeReport(IReportEngine reportEngine, Connection theConnection, ReportingMessage msg) throws Exception {
logger.info("Report : " + reportingLocation );
String rptDesign = getApplicationConfiguration().get(ReportConstants.REPORT_ROOT_DIR)+ msg.getReportDesingFile();
IReportRunnable runnable;
try {
runnable = reportEngine.openReportDesign(new ClassPathResource(rptDesign).getInputStream());
IRunAndRenderTask runAndRenderTask = reportEngine.createRunAndRenderTask(runnable);
ModuleHandle birtReport = runnable.getDesignHandle().getModuleHandle();
runAndRenderTask.getAppContext().put("birt_engine",new Boolean(true));
runAndRenderTask.setParameterValue(ReportConstants.REPORT_CHARID_PARM_KEY, msg.getReportCharID());
runAndRenderTask.setParameterValue(ReportConstants.REPORT_DPVID_PARM_KEY,msg.getDomainProposalVersionId());
//set the passed in connection...
runAndRenderTask.getAppContext().put(ReportConstants.REPORT_ODADRIVER_CONNECTION_PARM_KEY, theConnection);
HTMLRenderOption htmlRenderOption = new HTMLRenderOption();
String outputFileName = reportingLocation.getPreStageReportPath()+reportingLocation.getReportName();
htmlRenderOption.setOutputFileName( outputFileName );
htmlRenderOption.setOutputFormat(msg.getOutputFormat());//ReportConstants.EXCEL_OUTPUT_FORMAT);
runAndRenderTask.setRenderOption(htmlRenderOption);
runAndRenderTask.run();
runAndRenderTask.close();
} catch (Exception e) {
logger.error("Exception ", e);
throw new Exception("BIRT Failed to run report \n"+e.getMessage());
} catch (Throwable t) {
logger.error("Throwable ", t);
throw new Exception("BIRT Failed to run report \n"+errorMessage);
}
}
Thanks
Krishna
Find more posts tagged with
Comments
There are no comments yet