Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-674

Generated read() should just switch directly on field.id

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.2
    • 0.3
    • Java - Compiler
    • None

    Description

      THRIFT-623 introduced a performance regression in the Java bindings.

      Instead of mapping field.id to an enum, testing if the enum is null, and then switching on the enum, the switch should just work directly on field.id, with a default case to handle unknown values.

      In some benchmarks I ran, this fix saved 13% on deserialization time.

      Attachments

        1. thrift-674.patch
          2 kB
          Bryan Duxbury

        Activity

          People

            bryanduxbury Bryan Duxbury
            cwalters Chad Walters
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: