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

Cache Enum.values()

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

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

      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.

              pruivo@redhat.com Pedro Ruivo
              pruivo@redhat.com Pedro Ruivo
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: