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

Reuse Mutable TField on read

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.12.0
    • Fix Version/s: None
    • Labels:
    • Patch Info:
      Patch Available
    • Flags:
      Patch

      Description

      The struct 'read' method allocates a TField object on each readFieldBegin(). This adds up to a lot of garbage. The patch creates and reuses a mutable TField object for reading.

      The patch modifies the TBinaryProtocol as an example, but the other protocols should probably be optimized as well (including TProtocolDecorator).

        Attachments

        1. mutable_read.patch
          5 kB
          Mike Rettig

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mrettig Mike Rettig
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: