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

Empty for loop inside pipeline quite slow

    XMLWordPrintable

Details

    Description

      We encounterd that a simple empty loop of 150 items takes 10 seconds te complete. A loop of 1000 iterations take up 1 minute. We don't see excessive CPU / memory usage on the Jenkins server / slave. The loop is very simple (nothing is executed inside the loop):

      for (i=0;i<1000;i++) {      

      }
           

      Attachments

        Activity

          hkw Huib-Jan Kwakernaak created issue -
          hkw Huib-Jan Kwakernaak made changes -
          Field Original Value New Value
          Description We encounterd that a simple empty loop of 150 items takes 10 seconds te complete. A loop of 1000 iterations take up 1 minute. We don't see excessive CPU / memory usage on the Jenkins server / slave. The loop is very simple (nothing is executes inside the loop):

          for (i=0;i<1000;i++) \{      

          }
               
          We encounterd that a simple empty loop of 150 items takes 10 seconds te complete. A loop of 1000 iterations take up 1 minute. We don't see excessive CPU / memory usage on the Jenkins server / slave. The loop is very simple (nothing is executed inside the loop):

          for (i=0;i<1000;i++) \{      

          }
                
          abayer Andrew Bayer made changes -
          Component/s workflow-cps-plugin [ 21713 ]
          Component/s pipeline-utility-steps-plugin [ 21135 ]
          abayer Andrew Bayer made changes -
          Assignee rsandell [ rsandell ]
          svanoort Sam Van Oort made changes -
          Priority Critical [ 2 ] Minor [ 4 ]
          abayer Andrew Bayer made changes -
          Labels pipeline pipeline triaged-2018-11
          abayer Andrew Bayer made changes -
          Labels pipeline triaged-2018-11 complex-cps-code pipeline triaged-2018-11

          People

            Unassigned Unassigned
            hkw Huib-Jan Kwakernaak
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: