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

ClassFilter uses Regexs to match String.startsWith patterns

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • remoting
    • None

      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.

          [JENKINS-37218] ClassFilter uses Regexs to match String.startsWith patterns

          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

          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

          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

          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

          Daniel Beck added a comment -

          stephenconnolly This is fixed now?

          Daniel Beck added a comment - stephenconnolly This is fixed now?

          remoting 2.62

          Stephen Connolly added a comment - remoting 2.62

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

              Created:
              Updated:
              Resolved: