You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2010/04/24 00:52:49 UTC
[jira] Created: (MYFACES-2672) Don't create more wrappers for
_behaviorsMap than necessary
Don't create more wrappers for _behaviorsMap than necessary
-----------------------------------------------------------
Key: MYFACES-2672
URL: https://issues.apache.org/jira/browse/MYFACES-2672
Project: MyFaces Core
Issue Type: Task
Components: JSR-314
Affects Versions: 2.0.0
Reporter: Leonardo Uribe
Assignee: Leonardo Uribe
Actually we have a code on UIComponentBase.wrapBehaviorsMap() that each time it is called it returns a Collections.unmodifiableMap(_behaviorsMap). I think we can use a transient variable here to hold the resulting instance, and each time it is called return it. Collections.unmodifiableMap is just a wrapper of the real one, so we can cache it safely here. UIComponentBase.getClientBehaviors could be called many times for the same component when it is rendered. I think it is worth to do it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-2672) Don't create more wrappers for
_behaviorsMap than necessary
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12860818#action_12860818 ]
Leonardo Uribe commented on MYFACES-2672:
-----------------------------------------
Hi Martin,
Ok, I committed the missing line.
regards,
Leonardo
> Don't create more wrappers for _behaviorsMap than necessary
> -----------------------------------------------------------
>
> Key: MYFACES-2672
> URL: https://issues.apache.org/jira/browse/MYFACES-2672
> Project: MyFaces Core
> Issue Type: Task
> Components: JSR-314
> Affects Versions: 2.0.0
> Reporter: Leonardo Uribe
> Assignee: Leonardo Uribe
> Fix For: 2.0.1-SNAPSHOT
>
>
> Actually we have a code on UIComponentBase.wrapBehaviorsMap() that each time it is called it returns a Collections.unmodifiableMap(_behaviorsMap). I think we can use a transient variable here to hold the resulting instance, and each time it is called return it. Collections.unmodifiableMap is just a wrapper of the real one, so we can cache it safely here. UIComponentBase.getClientBehaviors could be called many times for the same component when it is rendered. I think it is worth to do it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-2672) Don't create more wrappers for
_behaviorsMap than necessary
Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12860804#action_12860804 ]
Martin Marinschek commented on MYFACES-2672:
--------------------------------------------
Hi Leonardo,
clearly you will need to reset the cached instance when a behaviour is added - but apart from this, the caching is certainly good.
best regards,
Martin
> Don't create more wrappers for _behaviorsMap than necessary
> -----------------------------------------------------------
>
> Key: MYFACES-2672
> URL: https://issues.apache.org/jira/browse/MYFACES-2672
> Project: MyFaces Core
> Issue Type: Task
> Components: JSR-314
> Affects Versions: 2.0.0
> Reporter: Leonardo Uribe
> Assignee: Leonardo Uribe
> Fix For: 2.0.1-SNAPSHOT
>
>
> Actually we have a code on UIComponentBase.wrapBehaviorsMap() that each time it is called it returns a Collections.unmodifiableMap(_behaviorsMap). I think we can use a transient variable here to hold the resulting instance, and each time it is called return it. Collections.unmodifiableMap is just a wrapper of the real one, so we can cache it safely here. UIComponentBase.getClientBehaviors could be called many times for the same component when it is rendered. I think it is worth to do it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (MYFACES-2672) Don't create more wrappers for
_behaviorsMap than necessary
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe resolved MYFACES-2672.
-------------------------------------
Fix Version/s: 2.0.1-SNAPSHOT
Resolution: Fixed
> Don't create more wrappers for _behaviorsMap than necessary
> -----------------------------------------------------------
>
> Key: MYFACES-2672
> URL: https://issues.apache.org/jira/browse/MYFACES-2672
> Project: MyFaces Core
> Issue Type: Task
> Components: JSR-314
> Affects Versions: 2.0.0
> Reporter: Leonardo Uribe
> Assignee: Leonardo Uribe
> Fix For: 2.0.1-SNAPSHOT
>
>
> Actually we have a code on UIComponentBase.wrapBehaviorsMap() that each time it is called it returns a Collections.unmodifiableMap(_behaviorsMap). I think we can use a transient variable here to hold the resulting instance, and each time it is called return it. Collections.unmodifiableMap is just a wrapper of the real one, so we can cache it safely here. UIComponentBase.getClientBehaviors could be called many times for the same component when it is rendered. I think it is worth to do it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.