You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2009/01/31 18:45:59 UTC

[jira] Commented: (WICKET-2064) Make Component.ENABLED_IN_HIERARCHY_CACHE_KEY a instance variable rather than a MetaDataKey

    [ https://issues.apache.org/jira/browse/WICKET-2064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669202#action_12669202 ] 

Igor Vaynberg commented on WICKET-2064:
---------------------------------------

the key is metadata because it is only used during rendering and then discarded in ondetach. if you make it a field then it will be serialized for every component to disk and held in memory which is wasteful. so the question is what is more overhead: memory hit+disk space hit vs runtime overhead of managing metadata entry.

> Make Component.ENABLED_IN_HIERARCHY_CACHE_KEY a instance variable rather than a MetaDataKey
> -------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2064
>                 URL: https://issues.apache.org/jira/browse/WICKET-2064
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4-RC1
>            Reporter: Juergen Donnerstag
>            Priority: Minor
>
> Component.ENABLED_IN_HIERARCHY_CACHE_KEY currently is a MetaDataKey which get added to each Component if isEnableInHierarchy is invoked. That basically happens all the time. In contrast the concept of MetaData has been introduced to allow rarely used data to be attached to Components (with java 1.5 in a typesafe manner). Since MetaData introduce some overhead, and for simplicity reasons, I'd suggest to convert Component.ENABLED_IN_HIERARCHY_CACHE_KEY into a Boolean instance variable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.