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

feature flag to use cloudbees-folder-plugin for dependency requirement

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Critical Critical
    • None
    • jenkins 2.46.2
      cloudbees-folder-plugin 6.0.4

      Since upgrading to Jenkins 2.x, we are forced to use cloudbees-folder plugin due to dependency requirement. Our Jenkins setup is quite large (have several thousands of jobs mapped to several thousands of users via matrix-auth plugin) and we do not use jenkins 'folders' feature. Since we started using this plugin, we noticed severe UI performance issue in loading the job home page (takes approximately 45 seconds to load) and further debugging (by getting several thread dumps in the consecutive seconds) revealed that this plugin is invoking Jenkins.getActiveInstance().getAllItems() which in turn loads all jobs in memory and runs through ACL permission check (which is a very expensive call in our setup). Attached the threaddump and here's the two places where Jenkins.getActiveInstance().getAllItems() method gets invoked.

      https://github.com/jenkinsci/cloudbees-folder-plugin/blob/master/src/main/java/com/cloudbees/hudson/plugins/folder/relocate/StandardHandler.java#L87

      https://github.com/jenkinsci/cloudbees-folder-plugin/blob/master/src/main/java/com/cloudbees/hudson/plugins/folder/relocate/StandardHandler.java#L137

      When disabling the above method calls, we noticed that UI performance was restored and job home page loaded in 2-3 seconds. It would be nice to have a feature flag to use this plugin for dependency requirement. When the feature flag is set, perform no-op or at least do not invoke Jenkins.getActiveInstance().getAllItems() method.

            Unassigned Unassigned
            jaisubramani Jai Subramani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: