Community
Participate
Working Groups
Test setup: Report query returning 10.000 entries displayed as a simple table (query takes about 1400ms to execute) When I execute this report using the ReportEngine API on Tomcat 6 BIRT requires 1GB of memory to produce an Excel report that is several MB in size. With a heap size less than 2GB Tomcat will produce Out-Of-Memory errors with the stack-trace attached below. Now, when I look at the heap-dump of the JVM I can see BIRT allocates zillions of "org.w3c.dom.CSSValue" objects claiming most of the heap's memory. If it takes 1GB for creating just one report I guess my Tomcat will blow up once there is more than one user requesting a report. Any idea how to reduce memory consumption in Excel reports? Stacktrace of OOM Error: java.lang.OutOfMemoryError: GC overhead limit exceeded java.util.Arrays.copyOfRange(Arrays.java:3209) java.lang.String.<init>(String.java:215) java.lang.StringBuilder.toString(StringBuilder.java:430) org.eclipse.birt.report.engine.css.engine.value.FloatValue.getCssText(FloatValue.java:38) org.eclipse.birt.report.engine.css.engine.value.FloatValue.getCssText(FloatValue.java:93) org.eclipse.birt.report.engine.css.engine.value.RGBColorValue.getCssText(RGBColorValue.java:65) org.eclipse.birt.report.engine.css.dom.AbstractStyle.getCssText(AbstractStyle.java:202) org.eclipse.birt.report.engine.css.dom.AbstractStyle.getColor(AbstractStyle.java:247) org.eclipse.birt.report.engine.emitter.excel.StyleBuilder.createStyleEntry(StyleBuilder.java:91) org.eclipse.birt.report.engine.emitter.excel.StyleEngine.initStyle(StyleEngine.java:135) org.eclipse.birt.report.engine.emitter.excel.StyleEngine.initStyle(StyleEngine.java:199) org.eclipse.birt.report.engine.emitter.excel.StyleEngine.createEntry(StyleEngine.java:72) org.eclipse.birt.report.engine.emitter.excel.layout.ExcelLayoutEngine.addCell(ExcelLayoutEngine.java:301) org.eclipse.birt.report.engine.emitter.excel.ExcelEmitter.startCell(ExcelEmitter.java:233) org.eclipse.birt.report.engine.emitter.CompositeContentEmitter.startCell(CompositeContentEmitter.java:233) org.eclipse.birt.report.engine.layout.html.HTMLTableLayoutEmitter.startCell(HTMLTableLayoutEmitter.java:705) org.eclipse.birt.report.engine.layout.html.HTMLTableLayoutEmitter.startCell(HTMLTableLayoutEmitter.java:701) org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.startContent(ContentEmitterUtil.java:59) org.eclipse.birt.report.engine.layout.html.buffer.DummyPageBuffer.startContainer(DummyPageBuffer.java:106) org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.start(HTMLStackingLM.java:50) org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:136) org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:111) org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutNodes(HTMLInlineStackingLM.java:160) org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26) org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:137) org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70) org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26) org.eclipse.birt.report.engine.layout.html.HTMLTableBandLM.layoutChildren(HTMLTableBandLM.java:67) org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:137) org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:70) org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.layoutChildren(HTMLStackingLM.java:26) org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layoutChildren(HTMLTableLM.java:132)
Is there any chance you could try with the latest 2.6.1 release?
Created attachment 191380 [details] sample report Can not reproduce this issue with 2.5.1 release on Tomcat 6 + jdk1.5 + WebViewerExample. The sample report contains 17,976 records.
Tomcat JVM setting: JAVA_OPTS="-server -Xmx512m -Xms128m -XX:MaxPermSize=512m" set as worksforme.
reopen for further check if there are too many CSSValue object.
Could you please attach the report design and the report document generated by the design?
Not reproducible on latest build. According to memory dump, a table more than 70000 rows and 25 columns could be rendered with 1GB memory, in which only 88m memory is occupied by 358 CSSValue instances. Rendering a table with 12500 rows * 25 columns only costs less than 400m memory on 64bit machine and 200m on 32bit machine.