Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338457 - Memory Improvement: Reduce the footprint of XMLDescriptor
Summary: Memory Improvement: Reduce the footprint of XMLDescriptor
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 334389
  Show dependency tree
 
Reported: 2011-02-28 14:52 EST by Blaise Doughan CLA
Modified: 2022-06-09 10:21 EDT (History)
1 user (show)

See Also:


Attachments
Core - Fix (4.60 KB, patch)
2011-02-28 15:00 EST, Blaise Doughan CLA
no flags Details | Diff
Core - Fix (4.54 KB, patch)
2011-02-28 15:27 EST, Blaise Doughan CLA
no flags Details | Diff
Core - Fix (2.34 KB, patch)
2011-03-02 12:24 EST, Blaise Doughan CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Blaise Doughan CLA 2011-02-28 14:52:17 EST
Currently XMLDescriptor is showing up as retaining the most memory (including transitive properties).  Although this makes sense since this represents the stateful information, we should improve memory usage here where we can.
Comment 1 Blaise Doughan CLA 2011-02-28 15:00:02 EST
Created attachment 189988 [details]
Core - Fix

Changes:

- Initialized size of primaryKeyFields from 2 to 1, ideally we would not initialize this collection all all since most XMLDescriptors do not have primary key fields, but this would be a larger change.
- Use Collections.EMPTY_LIST & Collections.EMPTY_MAP for several list and map properties that are not used by OXM, but EclipseLink requires to be non-null.
- Created a static variable for EMPTY_VECTOR where Collections.EMPTY_LIST can not be used.
- Created a custom CopyPolicy that does nothing, since EclipseLink requires that a copy policy be set.
Comment 2 Blaise Doughan CLA 2011-02-28 15:27:16 EST
Created attachment 189992 [details]
Core - Fix
Comment 3 Blaise Doughan CLA 2011-03-02 12:24:52 EST
Created attachment 190179 [details]
Core - Fix

Changes:

- Initialized size of primaryKeyFields from 2 to 1, ideally we would not
initialize this collection all all since most XMLDescriptors do not have
primary key fields, but this would be a larger change.
- Use Collections.EMPTY_LIST & Collections.EMPTY_MAP for several list and map
properties that are not used by OXM, but EclipseLink requires to be non-null.
- Created a static variable for EMPTY_VECTOR where Collections.EMPTY_LIST can
not be used.

Note:
Due to an issue trying to have an optimized CopyPolicy with deployment XML, this change will not be covered by this bug.
Comment 4 Blaise Doughan CLA 2011-03-02 12:29:47 EST
Fix checked into trunk at rev:  9055
Fix checked into 2.2.1 at rev:  9056
Fix checked into 2.1.3 at rev:  9057

Code reviewed by:  Rick Barkhouse
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:21:52 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink