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

ClassFilter uses Regexs to match String.startsWith patterns

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: remoting
    • Labels:
      None
    • Similar Issues:

      Description

      From profiling connections using the load-testing client in the JENKINS-36871 PR I have notices that there is a lot of work done matching classes in the classfilter against simple regexes.

      There is a >50% reduction in this portion of CPU work if we replace the simple patterns with String.startsWith calls instead. This also reduces the GC pressure.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          src/main/java/hudson/remoting/ClassFilter.java
          http://jenkins-ci.org/commit/remoting/c2f1e5d8e49731ce8b34720243623cf6cf9d0217
          Log:
          [FIXED JENKINS-37218] Use String.startsWith() for simple patterns

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/hudson/remoting/ClassFilter.java http://jenkins-ci.org/commit/remoting/c2f1e5d8e49731ce8b34720243623cf6cf9d0217 Log: [FIXED JENKINS-37218] Use String.startsWith() for simple patterns
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          src/main/java/hudson/remoting/ClassFilter.java
          http://jenkins-ci.org/commit/remoting/6664aaec4773fc3a8a8320c9e97c462252ca749b
          Log:
          JENKINS-37218 Fix findbugs issues

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/hudson/remoting/ClassFilter.java http://jenkins-ci.org/commit/remoting/6664aaec4773fc3a8a8320c9e97c462252ca749b Log: JENKINS-37218 Fix findbugs issues
          Hide
          danielbeck Daniel Beck added a comment -

          Stephen Connolly This is fixed now?

          Show
          danielbeck Daniel Beck added a comment - Stephen Connolly This is fixed now?
          Hide
          stephenconnolly Stephen Connolly added a comment -

          remoting 2.62

          Show
          stephenconnolly Stephen Connolly added a comment - remoting 2.62

            People

            Assignee:
            stephenconnolly Stephen Connolly
            Reporter:
            stephenconnolly Stephen Connolly
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: