You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Martin Kočí (Created JIRA)" <de...@myfaces.apache.org> on 2012/02/25 20:03:48 UTC
[jira] [Created] (MYFACES-3480) [perf] Use lazy init for
HashMap/HastSet where possible
[perf] Use lazy init for HashMap/HastSet where possible
-------------------------------------------------------
Key: MYFACES-3480
URL: https://issues.apache.org/jira/browse/MYFACES-3480
Project: MyFaces Core
Issue Type: Improvement
Reporter: Martin Kočí
Assignee: Martin Kočí
Priority: Minor
goal: make component tree creation fast as possible and avoid unnecessary instances
some components instantialize attributes direct in field or in constructor. In many cases it is not necessary, because those HashMap/Set instances are not used in current request/response - it depends on use case.
Example: UIViewRoot.listenerSuccessMap: lazy init is very suitable, because many view have no phase listener.
Check all components: candidates are "smarter" components like UIDate or UIInput
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (MYFACES-3480) [perf] Use lazy init for
HashMap/HastSet where possible
Posted by "Martin Kočí (Updated JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Kočí updated MYFACES-3480:
---------------------------------
Status: Patch Available (was: Open)
> [perf] Use lazy init for HashMap/HastSet where possible
> -------------------------------------------------------
>
> Key: MYFACES-3480
> URL: https://issues.apache.org/jira/browse/MYFACES-3480
> Project: MyFaces Core
> Issue Type: Improvement
> Reporter: Martin Kočí
> Assignee: Martin Kočí
> Priority: Minor
> Attachments: FaceletCompositionContextImpl.patch, RequestViewContext.patch, TemplateContextImpl.patch, UIViewRoot.patch, _ComponentAttributesMap.patch
>
>
> goal: make component tree creation fast as possible and avoid unnecessary instances
> some components instantialize attributes direct in field or in constructor. In many cases it is not necessary, because those HashMap/Set instances are not used in current request/response - it depends on use case.
> Example: UIViewRoot.listenerSuccessMap: lazy init is very suitable, because many view have no phase listener.
> Check all components: candidates are "smarter" components like UIDate or UIInput
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MYFACES-3480) [perf] Use lazy init for
HashMap/HastSet where possible
Posted by "Martin Kočí (Commented JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13223524#comment-13223524 ]
Martin Kočí commented on MYFACES-3480:
--------------------------------------
patches for classes found by profiler. _ComponentAttributesMap patch reduces unnecessary StateHelper/HashMap initializations from:
javax.faces.component._ComponentAttributesMap.getUnderlyingMap()
javax.faces.component._ComponentAttributesMap.containsKey(Object)
javax.faces.component.UIComponent.isCompositeComponent(UIComponent)
javax.faces.component.UIComponent._isCompositeComponent()
and
javax.faces.component._ComponentAttributesMap.get()
org.apache.myfaces.view.facelets.impl.FaceletCompositionContextImpl.finalizeForDeletion(UIComponent)
There are more classes for optimalization, but complexity requires separate bugs.
> [perf] Use lazy init for HashMap/HastSet where possible
> -------------------------------------------------------
>
> Key: MYFACES-3480
> URL: https://issues.apache.org/jira/browse/MYFACES-3480
> Project: MyFaces Core
> Issue Type: Improvement
> Reporter: Martin Kočí
> Assignee: Martin Kočí
> Priority: Minor
> Attachments: FaceletCompositionContextImpl.patch, RequestViewContext.patch, TemplateContextImpl.patch, UIViewRoot.patch, _ComponentAttributesMap.patch
>
>
> goal: make component tree creation fast as possible and avoid unnecessary instances
> some components instantialize attributes direct in field or in constructor. In many cases it is not necessary, because those HashMap/Set instances are not used in current request/response - it depends on use case.
> Example: UIViewRoot.listenerSuccessMap: lazy init is very suitable, because many view have no phase listener.
> Check all components: candidates are "smarter" components like UIDate or UIInput
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (MYFACES-3480) [perf] Use lazy init for
HashMap/HastSet where possible
Posted by "Leonardo Uribe (Updated) (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3480?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe updated MYFACES-3480:
------------------------------------
Resolution: Fixed
Fix Version/s: 2.1.7
2.0.13
Status: Resolved (was: Patch Available)
Thanks to Martin Koci for provide this patch
> [perf] Use lazy init for HashMap/HastSet where possible
> -------------------------------------------------------
>
> Key: MYFACES-3480
> URL: https://issues.apache.org/jira/browse/MYFACES-3480
> Project: MyFaces Core
> Issue Type: Improvement
> Reporter: Martin Kočí
> Assignee: Martin Kočí
> Priority: Minor
> Fix For: 2.0.13, 2.1.7
>
> Attachments: FaceletCompositionContextImpl.patch, RequestViewContext.patch, TemplateContextImpl.patch, UIViewRoot.patch, _ComponentAttributesMap.patch
>
>
> goal: make component tree creation fast as possible and avoid unnecessary instances
> some components instantialize attributes direct in field or in constructor. In many cases it is not necessary, because those HashMap/Set instances are not used in current request/response - it depends on use case.
> Example: UIViewRoot.listenerSuccessMap: lazy init is very suitable, because many view have no phase listener.
> Check all components: candidates are "smarter" components like UIDate or UIInput
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira