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

Loading projects too slow because of File.isDirectory calls

      With lazy loading, Jenkins no longer reads $JENKINS_HOME/jobs/*/builds/*/config.xml during startup. But it still checks File.isDirectory on the containing directories, which makes loadIdOnDisk slow. It should suffice for RunMap.createDirectoryFilter to assume that any file in builds which matches the date pattern for a build directory is in fact a directory. (If it is not, retrieve will return null later, so no harm done.) loadIdOnDisk could also avoid calling dir.list twice (once for build directories, once for shortcuts): call it once and filter appropriately.

          [JENKINS-21078] Loading projects too slow because of File.isDirectory calls

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          core/src/main/java/hudson/model/RunMap.java
          core/src/main/java/jenkins/model/lazy/AbstractLazyLoadRunMap.java
          http://jenkins-ci.org/commit/jenkins/a6e01f77c6d3d72f7ac9e99ce061ce04dbf4b515
          Log:
          [FIXED JENKINS-21078] Optimizing loadIdOnDisk.

          Compare: https://github.com/jenkinsci/jenkins/compare/d81c2406a27c...a6e01f77c6d3

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/model/RunMap.java core/src/main/java/jenkins/model/lazy/AbstractLazyLoadRunMap.java http://jenkins-ci.org/commit/jenkins/a6e01f77c6d3d72f7ac9e99ce061ce04dbf4b515 Log: [FIXED JENKINS-21078] Optimizing loadIdOnDisk. Compare: https://github.com/jenkinsci/jenkins/compare/d81c2406a27c...a6e01f77c6d3

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3125
          [FIXED JENKINS-21078] Optimizing loadIdOnDisk. (Revision a6e01f77c6d3d72f7ac9e99ce061ce04dbf4b515)

          Result = SUCCESS
          Jesse Glick : a6e01f77c6d3d72f7ac9e99ce061ce04dbf4b515
          Files :

          • changelog.html
          • core/src/main/java/jenkins/model/lazy/AbstractLazyLoadRunMap.java
          • core/src/main/java/hudson/model/RunMap.java

          dogfood added a comment - Integrated in jenkins_main_trunk #3125 [FIXED JENKINS-21078] Optimizing loadIdOnDisk. (Revision a6e01f77c6d3d72f7ac9e99ce061ce04dbf4b515) Result = SUCCESS Jesse Glick : a6e01f77c6d3d72f7ac9e99ce061ce04dbf4b515 Files : changelog.html core/src/main/java/jenkins/model/lazy/AbstractLazyLoadRunMap.java core/src/main/java/hudson/model/RunMap.java

          can you move it also as lts candidate?

          Ireneusz Makowski added a comment - can you move it also as lts candidate?

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/model/RunMap.java
          core/src/main/java/jenkins/model/lazy/AbstractLazyLoadRunMap.java
          http://jenkins-ci.org/commit/jenkins/70989d965fd630134b38b610f19a3661e65ceb5f
          Log:
          [FIXED JENKINS-21078] Optimizing loadIdOnDisk.
          (cherry picked from commit a6e01f77c6d3d72f7ac9e99ce061ce04dbf4b515)

          Conflicts:
          changelog.html

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/RunMap.java core/src/main/java/jenkins/model/lazy/AbstractLazyLoadRunMap.java http://jenkins-ci.org/commit/jenkins/70989d965fd630134b38b610f19a3661e65ceb5f Log: [FIXED JENKINS-21078] Optimizing loadIdOnDisk. (cherry picked from commit a6e01f77c6d3d72f7ac9e99ce061ce04dbf4b515) Conflicts: changelog.html

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: