Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-26170

Improve the performance for NoActivityTimeOutStrategy

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 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.

          [JENKINS-26170] Improve the performance for NoActivityTimeOutStrategy

          ikedam created issue -
          ikedam made changes -
          Link New: This issue is related to JENKINS-23012 [ JENKINS-23012 ]
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          ikedam made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 160161 ] New: JNJira + In-Review [ 208307 ]

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

              Created:
              Updated:
              Resolved: