Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-6061

Cache Enum.values()

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • 8.2.0.Beta1, 8.2.0.Final
    • 8.0.2.Final
    • Core
    • None

    Description

      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.

      Attachments

        Activity

          People

            pruivo@redhat.com Pedro Ruivo
            pruivo@redhat.com Pedro Ruivo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: