[
https://issues.apache.org/jira/browse/TRINIDAD-2314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13459121#comment-13459121
]
Stevan Malesevic commented on TRINIDAD-2314:
--------------------------------------------
Attached is a new readonly iterator that can be use. UIXComponentBase can have
a new method like
public Iterator<UIComponent> getFacetsAndChildrenOpt()
{
if ((_facets == null) && (_children == null))
{
return _EMPTY_UICOMPONENT_ITERATOR;
}
return new CompositeReadIterator(this);
}
IN UIXComponentBase we can use this new method instead of standard and also in
method _findInsideOf we can use it if from instanceof UIXComponentBase
> UIXComponentBase::getFacetsAndChildren creates a lot of transient objects
> impacting GC
> --------------------------------------------------------------------------------------
>
> Key: TRINIDAD-2314
> URL: https://issues.apache.org/jira/browse/TRINIDAD-2314
> Project: MyFaces Trinidad
> Issue Type: Bug
> Reporter: Stevan Malesevic
> Attachments: CompositeReadIterator.java
>
>
> UIXComponentBase::getFacetsAndChildren creates a new Iterator on every
> invocation. It is frequently used from recursive methods like
> invokeOnChildrenComponents and _findInsideOf which makes memory allocations
> much higher
> In case when comp is instance of UIXComponentBase we can be a bit smarted
> and just walk over _children and _factes avoiding transient memory allocations
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira