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

Bug 281131

Summary: ThemeCssProperty consumes too much memory
Product: [RT] RAP Reporter: Benjamin Muskalla <b.muskalla>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: 1.2   
Target Milestone: 1.3 M1   
Hardware: All   
OS: All   
Whiteboard: sr121
Attachments:
Description Flags
heap analysis
none
Proposed patch none

Description Benjamin Muskalla CLA 2009-06-22 15:12:23 EDT
ThemeCssProperty instances currently have Strings for name, type and description.
As far as I can see type and description are *never* used and we should really get rid of them. This would save up to 36mb of heap memory.
Going a step further as only name is left this could be inlined instead of being wrapped in an ThemeCssProperty so save more memory.

In my tests I just removed the fields, methods and interface definitions for type and description.
Comment 1 Benjamin Muskalla CLA 2009-06-22 15:13:13 EDT
Created attachment 139794 [details]
heap analysis

.
Comment 2 Ralf Sternberg CLA 2009-06-23 04:59:59 EDT
The type field was needed during the property/css switch. Don't remember why the description came into th class.

I agree that we can eliminate (I)ThemeCssProperty and replace it with String. The same for (I)ThemeCssAttribute. The description field can also be removed from (I)ThemeCssElement.
Comment 3 Ralf Sternberg CLA 2009-06-29 12:45:00 EDT
Created attachment 140405 [details]
Proposed patch

This patch removes the obsolete types mentioned in comment 2
Comment 4 Ralf Sternberg CLA 2009-06-29 15:20:22 EDT
Committed patch to HEAD. Someone please revise for SR1.
Comment 5 RĂ¼diger Herrmann CLA 2009-06-30 05:03:57 EDT
(In reply to comment #4)
> Committed patch to HEAD. Someone please revise for SR1.
Looks good to me. +1 to commit in v12_Maintenance branch.
Comment 6 Ralf Sternberg CLA 2009-06-30 06:08:42 EDT
Applied patch to 1.2 maintenance branch.