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

Git parameter branch selector becomes slow after a period of time

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-parameter-plugin
    • None
    • OS: Ubuntu 18.04
      Jenkins version: 2.121.3
      Git Parameter version: 0.9.4

      Hello.

       

      I have a deployment job with about 26 branch selectors. It takes about 3-4 minutes to load the menu with all branches using git parameter plugin.  But I noticed that it takes only 10 seconds If I will clone the job and will do the same in the cloned job. But after a period of time it will also become slow.

      I suppose that it is possible to load branches fast for every deployment. I tried to wipe workspace and to restart Jenkins. But it didn't help.

       

      Please let me know if you need some additional info.

       

      Update: Just updated Jenkins till 2.138.2 and Git parameter till 0.9.6. Issue still persists.

          [JENKINS-54171] Git parameter branch selector becomes slow after a period of time

          Boguslaw Klimas added a comment - PR:  https://github.com/jenkinsci/git-parameter-plugin/pull/72

          Thank you for fast response. I will be happy to test a new version of this plugin.

          Andrei Brajnicov added a comment - Thank you for fast response. I will be happy to test a new version of this plugin.

          Hi klimas7

          I would like to inform you that I just tried to test updated version of the plugin, which was generated using this build

          Unfortunately the menu with branch selector was loading still slow. I was unable to notice some speed improvements.

          But in the cloned job, It took only 15 seconds to load all branches for my 26 projects.

          Andrei Brajnicov added a comment - Hi klimas7 I would like to inform you that I just tried to test updated version of the plugin, which was generated using this build Unfortunately the menu with branch selector was loading still slow. I was unable to notice some speed improvements. But in the cloned job, It took only 15 seconds to load all branches for my 26 projects.

          Boguslaw Klimas added a comment - - edited

          Hi,

          Thanks for test. I understood your job configuration looks similar that?

          pipeline {
              agent any
              parameters {
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_01', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_02', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_03', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_04', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_05', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_06', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_07', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_08', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_09', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_10', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_11', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_12', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_13', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_14', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_15', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_16', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_17', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_18', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_19', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_20', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_21', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_22', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
                  gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_23', type: 'PT_BRANCH', useRepository: '.*git-parameter-plugin.git'
              }
              stages {
                  stage('Example') {
                      steps {
                          git branch: "${params.BRANCH_01}", url: 'https://github.com/jenkinsci/git-parameter-plugin.git'
                      }
                  }
              }
          }
          

           This example work fast on me local jenkins, could you try this?

           

          Boguslaw Klimas added a comment - - edited Hi, Thanks for test. I understood your job configuration looks similar that? pipeline { agent any parameters { gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_01' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_02' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_03' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_04' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_05' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_06' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_07' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_08' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_09' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_10' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_11' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_12' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_13' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_14' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_15' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_16' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_17' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_18' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_19' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_20' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_21' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_22' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' gitParameter branchFilter: 'origin.*/(.*)' , defaultValue: 'master' , name: 'BRANCH_23' , type: 'PT_BRANCH' , useRepository: '.*git-parameter-plugin.git' } stages { stage( 'Example' ) { steps { git branch: "${params.BRANCH_01}" , url: 'https: //github.com/jenkinsci/git-parameter-plugin.git' } } } }  This example work fast on me local jenkins, could you try this?  

          Andrei Brajnicov added a comment - - edited

          Thank you klimas7 for such fast response.

          You pipeline was loading pretty fast for me, but unfortunately I still have issues with my deployment.

          Probably because my deployment job is not a pipeline, but it is a MultiJob Project.

           

          Here is a sample of my config.xml :  

          <net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition plugin="git-parameter@0.9.6">
           <name>A</name>
           <description></description>
           <uuid>720703d4-a0dd-46e7-b6f1-5597c53c1be2</uuid>
           <type>PT_BRANCH</type>
           <branch></branch>
           <tagFilter>*</tagFilter>
           <branchFilter>origin[0-9]{0,}/(.*)</branchFilter>
           <sortMode>NONE</sortMode>
           <defaultValue>master</defaultValue>
           <selectedValue>NONE</selectedValue>
           <useRepository>A.git</useRepository>
           <quickFilterEnabled>true</quickFilterEnabled>
           <listSize>5</listSize>
           </net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition>
          <net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition plugin="git-parameter@0.9.6">
           <name>B</name>
           <description></description>
           <uuid>c1dd1635-57b5-4055-be95-5e761fd2cef9</uuid>
           <type>PT_BRANCH</type>
           <branch></branch>
           <tagFilter>*</tagFilter>
           <branchFilter>origin[0-9]{0,}/(.*)</branchFilter>
           <sortMode>NONE</sortMode>
           <defaultValue>master</defaultValue>
           <selectedValue>NONE</selectedValue>
           <useRepository>B.git</useRepository>
           <quickFilterEnabled>true</quickFilterEnabled>
           <listSize>5</listSize>
           </net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition>
          <net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition plugin="git-parameter@0.9.6">
           <name>C</name>
           <description></description>
           <uuid>bfb3e395-b5e4-483f-bd6b-e2292a393cf2</uuid>
           <type>PT_BRANCH</type>
           <branch></branch>
           <tagFilter>*</tagFilter>
           <branchFilter>origin[0-9]{0,}/(.*)</branchFilter>
           <sortMode>NONE</sortMode>
           <defaultValue>master</defaultValue>
           <selectedValue>NONE</selectedValue>
           <useRepository>C.git</useRepository>
           <quickFilterEnabled>true</quickFilterEnabled>
           <listSize>5</listSize>
          </net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition>

          ^ actual config is a bit longer, as I told you I have ~ 26 repositories.

           

           

          In case if it will be helpful, I can record a video with detailed example.

           

          Andrei Brajnicov added a comment - - edited Thank you klimas7 for such fast response. You pipeline was loading pretty fast for me, but unfortunately I still have issues with my deployment. Probably because my deployment job is not a pipeline, but it is a MultiJob Project.   Here is a sample of my config.xml :    <net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition plugin= "git-parameter@0.9.6" > <name>A</name> <description></description> <uuid>720703d4-a0dd-46e7-b6f1-5597c53c1be2</uuid> <type>PT_BRANCH</type> <branch></branch> <tagFilter>*</tagFilter> <branchFilter>origin[0-9]{0,}/(.*)</branchFilter> <sortMode>NONE</sortMode> <defaultValue>master</defaultValue> <selectedValue>NONE</selectedValue> <useRepository>A.git</useRepository> <quickFilterEnabled> true </quickFilterEnabled> <listSize>5</listSize> </net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition> <net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition plugin= "git-parameter@0.9.6" > <name>B</name> <description></description> <uuid>c1dd1635-57b5-4055-be95-5e761fd2cef9</uuid> <type>PT_BRANCH</type> <branch></branch> <tagFilter>*</tagFilter> <branchFilter>origin[0-9]{0,}/(.*)</branchFilter> <sortMode>NONE</sortMode> <defaultValue>master</defaultValue> <selectedValue>NONE</selectedValue> <useRepository>B.git</useRepository> <quickFilterEnabled> true </quickFilterEnabled> <listSize>5</listSize> </net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition> <net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition plugin= "git-parameter@0.9.6" > <name>C</name> <description></description> <uuid>bfb3e395-b5e4-483f-bd6b-e2292a393cf2</uuid> <type>PT_BRANCH</type> <branch></branch> <tagFilter>*</tagFilter> <branchFilter>origin[0-9]{0,}/(.*)</branchFilter> <sortMode>NONE</sortMode> <defaultValue>master</defaultValue> <selectedValue>NONE</selectedValue> <useRepository>C.git</useRepository> <quickFilterEnabled> true </quickFilterEnabled> <listSize>5</listSize> </net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition> ^ actual config is a bit longer, as I told you I have ~ 26 repositories.     In case if it will be helpful, I can record a video with detailed example.  

          If is not a problem for you, you can try prepare job using some open source repositories (hosting on github) and attach config.xml.
          That would be very helpful in reproduce this issue in my local environment.

          In MultiJob project you use MultiSCM definition and you have a few/many git repository? 

          Boguslaw Klimas added a comment - If is not a problem for you, you can try prepare job using some open source repositories (hosting on github) and attach config.xml. That would be very helpful in reproduce this issue in my local environment. In MultiJob project you use MultiSCM definition and you have a few/many git repository? 

          Hi snaf
          You can do Thread dump (http://YOUR_JENKINS_HOST/threadDump) during page are loaded, maybe you can get some interesting information.
          Good example is in this issue JENKINS-54504

          Boguslaw Klimas added a comment - Hi snaf You can do Thread dump ( http://YOUR_JENKINS_HOST/threadDump ) during page are loaded, maybe you can get some interesting information. Good example is in this issue JENKINS-54504

          hi klimas7
          Sorry for my late response. I want to inform you that I'm unable to reproduce it using Pipeline.

          But it it still reproducible using MultiJob.

          I'll post some additional info how to reproduce it soon.

          Andrei Brajnicov added a comment - hi klimas7 Sorry for my late response. I want to inform you that I'm unable to reproduce it using Pipeline. But it it still reproducible using MultiJob. I'll post some additional info how to reproduce it soon.

          Hi snaf

          Currently I'm closing this issue, if you will have more information please add them and reopen issue

          Boguslaw Klimas added a comment - Hi snaf Currently I'm closing this issue, if you will have more information please add them and reopen issue

          Mikhail T added a comment -

          I too have this problem – the list of commits takes several minutes to populate. Attaching the project's config...

          GSL-jenkins-config.xml

          Mikhail T added a comment - I too have this problem – the list of commits takes several minutes to populate. Attaching the project's config... GSL-jenkins-config.xml

            klimas7 Boguslaw Klimas
            snaf Andrei Brajnicov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: