• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • active-choices-plugin
    • None
    • Jenkins ver. 2.32.3, Active Choices Plug-in 1.5.3 or earlier, on Windows Server 2013, Java Version 1.8.0_102 on master, Job DSL Plugin 1.58

      I have a "Build with Parameters" build that has 34 Active Choices Reactive Parameters, based off the field called ENV.  The Jenkins instance has 750, other unrelated jobs.  When I click "Build with Parameters", the Browser will spin for about 45 seconds, then it will take about another 1 minutes 30 seconds to load.  It does this in Firefox 52 (64-bit) and Chrome 56.0.2924.87 (64-bit)

       

      If I stop Jenkins, and delete all the other 749 jobs, except this one, and click "Build with Parameters", the parameters load instantaneously.

       

      Why would my unrelated jobs causing the "Build with Parameters" to take so long?

       

      Attached is one of 30 fields in the job, and how its configured. They are all similar. Attached is also the current requests that sits pending for the entire 2:15 minutes in JavaMelody monitoring 

       

      Any help is appreciated.  Thank you.

        1. 2017-03-15_20-54-37.jpg
          2017-03-15_20-54-37.jpg
          116 kB
        2. 2017-03-15_20-57-54.jpg
          2017-03-15_20-57-54.jpg
          153 kB
        3. config_configuresave.xml
          51 kB
        4. config_generatedbydsl.xml
          63 kB
        5. EnvValues.groovy
          0.2 kB
        6. jobdsl.groovy
          12 kB
        7. test.json
          6 kB

          [JENKINS-42824] Super Slow "Build with Parameters" loading

          Hi jzz0000!

          That sounds like a very interesting use case! Let me know if you ever write/blog about how you are using the plugin. ioannis and myself are always keen to learn how the users of the plug-in are using it.

          I'm working on JENKINS-39593, for performance issues. This issue could - very likely - be related to yours.

          I have created one sample job, and 1000 other unrelated jobs. So far I'm just printing the job output, looking at how many times the parameters are executed, before I start measuring load/execution time (which takes longer).

          Feel free to chime in there in case you have time to reproduce your case in a test bed server with a similar approach. It would be grand if you could get a generic job like yours, with similar number of parameters, then run that script in JENKINS-39593, and see if you are able to reproduce the issue.

          If so, I would be happy to repeat your steps in my development environment and profile / debug the issue.

          Ta
          Bruno

          Bruno P. Kinoshita added a comment - Hi jzz0000 ! That sounds like a very interesting use case! Let me know if you ever write/blog about how you are using the plugin. ioannis and myself are always keen to learn how the users of the plug-in are using it. I'm working on JENKINS-39593 , for performance issues. This issue could - very likely - be related to yours. I have created one sample job, and 1000 other unrelated jobs. So far I'm just printing the job output, looking at how many times the parameters are executed, before I start measuring load/execution time (which takes longer). Feel free to chime in there in case you have time to reproduce your case in a test bed server with a similar approach. It would be grand if you could get a generic job like yours, with similar number of parameters, then run that script in JENKINS-39593 , and see if you are able to reproduce the issue. If so, I would be happy to repeat your steps in my development environment and profile / debug the issue. Ta Bruno

          Jurgens H added a comment - - edited

          I failed to mention that we use Java Version 1.8.0_102 on our Jenkins Master

          By trying to set up a sample for you, I found something very interesting.  We use Job DSL to generate our jobs.  We have https://wiki.jenkins-ci.org/display/JENKINS/Job+DSL+Plugin version 1.58 installed.  I generated SampleJob using the attached jobdsl.groovy.  The test.json and scriptler script is also attached.

          Here are my scenarios:

          1. With 767 jobs on my master, I generate the SampleJob using DSL, and immediately click "Build with Parameters" after SampleJob is generated...
          Results: The pages says "Connecting..." for 1 minutes 36 seconds.  Then it loads for 1 minutes 44 seconds.  When I change ENV field from "Test1" to "Test2", it takes another 1 minutes 45 seconds to reload.
          Config File from Jobs folder: config_generatedbydsl.xml

          2. With 767 jobs on my master, I Configure and immediately Save the SampleJob in Jenkins, without any changes...
          Results: The pages says "Connecting..." for 24 seconds.  Then it loads for 27 seconds.  When I change ENV field from "Test1" to "Test2", it takes another 28 seconds to reload.
          Config File from Jobs folder: config_configuresave.xml

          Then I delete all the other 765 jobs.  The only jobs left is the DSL job and SampleJob.

          1. With 2 jobs on my master, I generate the SampleJob using DSL, and immediately click "Build with Parameters" after SampleJob is generated...
          Results: The pages says "Connecting..." for 22 seconds.  Then it loads for 27 seconds.  When I change ENV field from "Test1" to "Test2", it takes another 32 seconds to reload.
          Config File from Jobs folder: config_generatedbydsl.xml

          2. With 2 jobs on my master, I Configure and immediately Save the SampleJob in Jenkins, without any changes...
          Results: The pages says "Connecting..." for 20 seconds.  Then it loads for 29 seconds.  When I change ENV field from "Test1" to "Test2", it takes another 28 seconds to reload.
          Config File from Jobs folder: config_configuresave.xml

          I hope this helps you.

          Thank you.

          Jurgens H added a comment - - edited I failed to mention that we use Java Version 1.8.0_102 on our Jenkins Master By trying to set up a sample for you, I found something very interesting.  We use Job DSL to generate our jobs.  We have https://wiki.jenkins-ci.org/display/JENKINS/Job+DSL+Plugin version 1.58 installed.  I generated SampleJob using the attached jobdsl.groovy.  The test.json and scriptler script is also attached. Here are my scenarios: 1. With 767 jobs on my master, I generate the SampleJob using DSL, and immediately click "Build with Parameters" after SampleJob is generated... Results: The pages says "Connecting..." for 1 minutes 36 seconds.  Then it loads for 1 minutes 44 seconds.  When I change ENV field from "Test1" to "Test2", it takes another 1 minutes 45 seconds to reload. Config File from Jobs folder: config_generatedbydsl.xml 2. With 767 jobs on my master, I Configure and immediately Save the SampleJob in Jenkins, without any changes... Results: The pages says "Connecting..." for 24 seconds.  Then it loads for 27 seconds.  When I change ENV field from "Test1" to "Test2", it takes another 28 seconds to reload. Config File from Jobs folder: config_configuresave.xml Then I delete all the other 765 jobs.  The only jobs left is the DSL job and SampleJob. 1. With 2 jobs on my master, I generate the SampleJob using DSL, and immediately click "Build with Parameters" after SampleJob is generated... Results: The pages says "Connecting..." for 22 seconds.  Then it loads for 27 seconds.  When I change ENV field from "Test1" to "Test2", it takes another 32 seconds to reload. Config File from Jobs folder: config_generatedbydsl.xml 2. With 2 jobs on my master, I Configure and immediately Save the SampleJob in Jenkins, without any changes... Results: The pages says "Connecting..." for 20 seconds.  Then it loads for 29 seconds.  When I change ENV field from "Test1" to "Test2", it takes another 28 seconds to reload. Config File from Jobs folder: config_configuresave.xml I hope this helps you. Thank you.

          Jurgens H added a comment -

          I am so sorry.  I did this whole write-up above (on March 16), and didn't realize that I actually had the Active Choices Plug-in 1.4 installed.  I'm so sorry.

          With 1.5.3, there seems to be NO different with a DSL generated job, or if you save and edit it like with the 1.4 plugin.   I redid my tests with Active Choices Plug-in 1.5.3, and here are my findings.

          1. With 767 jobs on my master, I generate the SampleJob using DSL, and immediately click "Build with Parameters" after SampleJob is generated...
          Results: The pages says "Connecting..." for 1 minutes 20 seconds.  Then it loads for 1 minutes 29 seconds.  When I change ENV field from "Test1" to "Test2", it takes another 1 minutes 32 seconds to reload.

          2. With 767 jobs on my master, I Configure and immediately Save the SampleJob in Jenkins, without any changes...
          Results: The pages says "Connecting..." for 1 minutes 21 seconds.  Then it loads for 1 minutes 28 seconds.  When I change ENV field from "Test1" to "Test2", it takes another 1 minutes 30 seconds to reload.

          Then I delete all the other 765 jobs.  The only jobs left is the DSL job and SampleJob.

          1. With 2 jobs on my master, I generate the SampleJob using DSL, and immediately click "Build with Parameters" after SampleJob is generated...
          Results: The pages says "Connecting..." for 2 seconds.  Then it loads for 15 seconds.  When I change ENV field from "Test1" to "Test2", it takes another 13 seconds to reload.

          2. With 2 jobs on my master, I Configure and immediately Save the SampleJob in Jenkins, without any changes...
          Results: The pages says "Connecting..." for 2 seconds.  Then it loads for 14 seconds.  When I change ENV field from "Test1" to "Test2", it takes another 12 seconds to reload.

          Jurgens H added a comment - I am so sorry.  I did this whole write-up above (on March 16), and didn't realize that I actually had the Active Choices Plug-in 1.4 installed.  I'm so sorry. With 1.5.3, there seems to be NO different with a DSL generated job, or if you save and edit it like with the 1.4 plugin.   I redid my tests with Active Choices Plug-in 1.5.3, and here are my findings. 1. With 767 jobs on my master, I generate the SampleJob using DSL, and immediately click "Build with Parameters" after SampleJob is generated... Results: The pages says "Connecting..." for 1 minutes 20 seconds.  Then it loads for 1 minutes 29 seconds.  When I change ENV field from "Test1" to "Test2", it takes another 1 minutes 32 seconds to reload. 2. With 767 jobs on my master, I Configure and immediately Save the SampleJob in Jenkins, without any changes... Results: The pages says "Connecting..." for 1 minutes 21 seconds.  Then it loads for 1 minutes 28 seconds.  When I change ENV field from "Test1" to "Test2", it takes another 1 minutes 30 seconds to reload. Then I delete all the other 765 jobs.  The only jobs left is the DSL job and SampleJob. 1. With 2 jobs on my master, I generate the SampleJob using DSL, and immediately click "Build with Parameters" after SampleJob is generated... Results: The pages says "Connecting..." for 2 seconds.  Then it loads for 15 seconds.  When I change ENV field from "Test1" to "Test2", it takes another 13 seconds to reload. 2. With 2 jobs on my master, I Configure and immediately Save the SampleJob in Jenkins, without any changes... Results: The pages says "Connecting..." for 2 seconds.  Then it loads for 14 seconds.  When I change ENV field from "Test1" to "Test2", it takes another 12 seconds to reload.

          Harman B added a comment -

          I have same issue in the jenkins.. It takes minutes to go from one selection to another. 

          Harman B added a comment - I have same issue in the jenkins.. It takes minutes to go from one selection to another. 

            kinow Bruno P. Kinoshita
            jzz0000 Jurgens H
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: