| Summary: | SVG charts with large number of data points exhaust heap space very quickly | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | akshay.s86 | ||||
| Component: | BIRT | Assignee: | Yulin Wang <Lionel.wyl> | ||||
| Status: | VERIFIED WORKSFORME | QA Contact: | Galina Derenshteyn <gderenshteyn> | ||||
| Severity: | major | ||||||
| Priority: | P3 | CC: | bluesoldier, hao.zhou, josh.deford, Lionel.wyl | ||||
| Version: | 3.7.1 | ||||||
| Target Milestone: | 4.4.1 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
akshay.s86
We have done performance test like this,no such issue. Could you provide a sample report we can test with? can not reproduce. Based on Yulin Wang and Hao Zhou latest comments, this is being moved to Verified for the upcoming 4.4.1 release. Should there be additional justifications for this issue to be reconsidered, please update with those comments, and it can be reopened for the next release. Created attachment 253424 [details]
A Patch
We have a bubble chart report with 3000 bubbles and are seeing out of memory errors. The problem occurs because each of the 3000 bubbles has a reference to a unique SeriesRenderingHints object. Each of which, in turn have 3000 unique reference to a DataPointHints object. The retained heap size of each DataPointHints object is 544 bytes. Since there are 9,000,000 of those we run out of memory pretty fast. We dug into this issue to try to determine why neither the SeriesRenderingHints nor the DataPointHints objects are being reused. We determined that, after all the rendering hints are created, they are then passed to a rendering function which determines wether to render each bubble by making a call to Bubble.isValidBubbleEntry which performs a null check on the DataPointRenderingHints object's orthogonalValue. Once we determined that DataPoinHints objects are considered invalid if they have a null orthogonalValue we scoured the rest of the code and determined that no DataPointHints are even used if they don't have their orthogonalValue set. If this assumption is correct then a solution to our out of memory issue is to prevent the creation of invalid DataPointRenderingHints object that will not be used when rendering a Plot2DAxes plot. The code that constructs the DataPointHints objects lies in PlotWith2DAxes.java. This appeared to be a natural place to add a null check and avoid creating the DataPointRenderingHints if their is no orthogonalValue to assign to it. However, introducing a bunch of null values into an array that, in previous releases, has had no null values, seemed a bit risky. Our approach was to create one DataPointRenderHints object with a null orthogonalValue. All DataPointHints objects that have a valid orthogonalValue are created as they always have been. But, when a null orthogonalValue is encountered, the one that has a null orthogonalValue is reused rather than created again. This reuse of invalid DataPointHints for PlotWith2DAxes significantly reduces the memory footprint created by bubble charts. I've attached a patch containing our fix. |