Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366947 - Memory Improvement (XPathNode) - Prevent nonAttributeChildrenList being created just to hold a text node
Summary: Memory Improvement (XPathNode) - Prevent nonAttributeChildrenList being creat...
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:
 
Reported: 2011-12-16 09:13 EST by Blaise Doughan CLA
Modified: 2022-06-09 10:26 EDT (History)
1 user (show)

See Also:


Attachments
Core - Fix (4.19 KB, patch)
2011-12-16 09:34 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-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