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

Loading projects too slow because of File.isDirectory calls

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          scm_issue_link 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

          Show
          scm_issue_link 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
          Hide
          dogfood 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
          Show
          dogfood 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
          Hide
          imakowski Ireneusz Makowski added a comment -

          can you move it also as lts candidate?

          Show
          imakowski Ireneusz Makowski added a comment - can you move it also as lts candidate?
          Hide
          scm_issue_link 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

          Show
          scm_issue_link 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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: