Improve the performance for NoActivityTimeOutStrategy

XMLWordPrintable

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Minor
    • Component/s: build-timeout-plugin
    • None

      @qwazctl commented in JENKINS-23012

      I just noticed this ticket now, so sorry for the late comment. But taking a quick look at the code, the performance issue is quite obvious: in BuildTimeoutWrapper.decorateLogger you are only overriding write(byte) in the wrapper OutputStream - that is hugely inefficient, as most writes occur through write(byte[]) or write(byte[], int, int), and those translate to calling write(byte) one byte at a time. So, override write(byte[], int, int) too (write(byte[]) can be left as is) and I think you'll find a noticeable improvement.

            Assignee:
            ikedam
            Reporter:
            ikedam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: