Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 347747

Summary: To much null objects in HashMap
Product: z_Archived Reporter: Jan Lerby <lerby84>
Component: BIRTAssignee: Xuelan Li <xuelan.li>
Status: RESOLVED FIXED QA Contact: Xiaoying Gu <bluesoldier>
Severity: critical    
Priority: P3 CC: bluesoldier
Version: unspecified   
Target Milestone: 3.7.1   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
Excerpt a typical HashMap none

Description Jan Lerby CLA 2011-05-31 05:18:36 EDT
Build Identifier: 20110218-0911

Hi,

we had memory problems with BIRT 2.6.2 and look for reason. During searching we have noticed that BIRT makes MANY HashMaps of report objects. The point of this bug is HashMaps have default size 16 items. Even if all items are null. And it contributes to consuming memory to crash.
I think better is to set size HashMap for 3 items. In most cases HashMap has 0 or 1 item. Less common is 2 or 3 items. And more than 3 items it is rarely.
I am adding picture of typical HashMap object.
HashMap is created in org.eclipse.birt.report.model.core.DesignElement for field propValues
protected Map<String, Object> propValues = new HashMap<String, Object>( );



Reproducible: Always
Comment 1 Jan Lerby CLA 2011-05-31 05:19:32 EDT
Created attachment 196969 [details]
Excerpt a typical HashMap
Comment 2 Xuelan Li CLA 2011-06-10 04:15:04 EDT
fixed.