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

          Andrei Brajnicov created issue -
          Andrei Brajnicov made changes -
          Summary Original: Git parameter branch selector becomes slow afeter a period of time New: Git parameter branch selector becomes slow after a period of time
          Andrei Brajnicov made changes -
          Description Original: 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.
          New: 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.
          Boguslaw Klimas made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Hi, 
          In this issue JENKINS-36833  I added synchronization block but after that I changed way to get branch or tag.
          Currently synchronization block is necessary only when the plugin getting revisions.
          I will try release plugin in this week

          Boguslaw Klimas added a comment - Hi,  In this issue  JENKINS-36833   I added synchronization block  but after that I changed way to get branch or tag. Currently synchronization block is necessary only when the plugin getting revisions. I will try release plugin in this week

          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?  
          Boguslaw Klimas made changes -
          Attachment New: image-2018-10-31-21-15-59-629.png [ 45017 ]

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

              Created:
              Updated: