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

TBufferedTransport performance issue since 0.10.0

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: 0.11.0
    • Component/s: Python - Library
    • Labels:
      None

      Description

      I upgrade thrift from 0.9.3 to 0.10.0, and our rpc calls slow down.
      I digged around the code, and find maybe it caused by the write function in TBufferedTransport.

      The last line seems useless, but cost time.

      TTransport.py
      def write(self, buf):
          try:
              self.__wbuf.write(buf)
              except Exception as e:
                  # on exception reset wbuf so it doesn't contain a partial function call
                  self.__wbuf = BufferIO()
                  raise e
          self.__wbuf.getvalue() # it seems useless, but cost time
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jking3 James E. King III
                Reporter:
                atiking Jin Yao
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: