[infinispan-issues] [JBoss JIRA] (ISPN-6061) Cache Enum.values()

Tristan Tarrant (JIRA) issues at jboss.org
Wed Jan 27 10:05:01 EST 2016


     [ https://issues.jboss.org/browse/ISPN-6061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tristan Tarrant updated ISPN-6061:
----------------------------------
           Status: Resolved  (was: Pull Request Sent)
    Fix Version/s: 8.2.0.Final
       Resolution: Done


> Cache Enum.values()
> -------------------
>
>                 Key: ISPN-6061
>                 URL: https://issues.jboss.org/browse/ISPN-6061
>             Project: Infinispan
>          Issue Type: Enhancement
>          Components: Core
>    Affects Versions: 8.0.2.Final
>            Reporter: Pedro Ruivo
>            Assignee: Pedro Ruivo
>             Fix For: 8.2.0.Beta1, 8.2.0.Final
>
>
> For safety reason, Enum.values() clones the values array in each invocation. Although the cloning is fast, it creates a lot of garbage (as it is used in every Enum unmarshalling). Cache it avoids cloning it every time.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the infinispan-issues mailing list