Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
Jenkins 2.73.1, Windows 2016, Java 8
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++) {
}
I'll second what Oleg said: this is not intended to be performant out-of-box as a general-purpose programming language. There's a lot of overhead for the CPS object manipulation.
Using NonCPS will make it considerably faster.
One planned enhancement in the future that will help some is to make Script Security checks use a more efficient algorithm for security-checking signatures.