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

Bug 366947

Summary: Memory Improvement (XPathNode) - Prevent nonAttributeChildrenList being created just to hold a text node
Product: z_Archived Reporter: Blaise Doughan <blaise.doughan>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipselink.oxm-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Core - Fix none

Description Blaise Doughan CLA 2011-12-16 09:13:23 EST
Currently we create an ArrayList for nonAttributeChildrenList even when it just contains a single text node.  Since XPathNode is already aware of text nodes we should be able to optimize this.  This would eliminate an ArrayList per direct mapping to an XML element.
Comment 1 Blaise Doughan CLA 2011-12-16 09:34:42 EST
Created attachment 208491 [details]
Core - Fix
Comment 2 Blaise Doughan CLA 2011-12-16 15:59:37 EST
Fix checked into 2.3.3 at rev:  10588
Fix checked into trunk at rev:  10592

Code reviewed by:  Denise Smith

Fix Details:
Now only for mixed content use cases will the text node be added to the nonAttributeChildren List.  This will never happen when used the standard JAXB 2 (JSR-222) mappings.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:26:59 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink