Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-7244

Don't allocate a Codec.Flag enum value array on every read

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Low
    • Resolution: Fixed
    • Fix Version/s: 2.0.9
    • Component/s: None
    • Labels:

      Description

      In QueryOptions.Codec.Flag.deserialize() we call Flag.values(), which constructs a copy of the Enum array each time. Since we only use this lookup the enums, and since it happens often, this is pretty wasteful. It seems to make a slight (barely perceptible) difference to throughput, but worth fixing either way.

        Attachments

        1. 7244.txt
          1.0 kB
          Benedict Elliott Smith

          Activity

            People

            • Assignee:
              benedict Benedict Elliott Smith
              Reporter:
              benedict Benedict Elliott Smith
              Authors:
              Benedict Elliott Smith
              Reviewers:
              David Brosius
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: