I've narrowed this issue down to commit 6e3de2429ff2d8b32d4210463cee4422e277b3b4 from PR 150 which introduced this issue.
If I build branch workflow-job-2.37 the issue is there. If i only revert commit 6e3de2429ff2d8b32d4210463cee4422e277b3b4 the issue doesn't occur.
This is easy to reproduce:
- Create a new Jenkins instance, docker example:
docker run --name jenkins-test --rm -d -p "8080:8080" jenkins/jenkins:lts-jdk11
- Install only the Pipeline plugin(s)
- Create a new Pipeline job similar to the one in this bug's description:
def genText(lines){
(1..lines).each{
println "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur interdum fringilla interdum"
}
return true
}
parallel firstBranch: {
genText(20000)
}, secondBranch: {
genText(20000)
}
- Run a build and let build complete so a large log file is created
- Try to browse to the build's /console or /consoleFull
It's unclear what is causing the slowness. In some of my JS profiling it seems to indicate some of the code in job/console/NewNodeConsoleNote/script.js:

However if I comment those lines out, the profiler still thinks it's spending time in this script:

But the cumulative time in the lines doesn't add up:

In fact, if I checkout the workflow-job-2.37 branch and revert only the changes to NewNodeConsoleNote/script.js from commit 6e3de2429ff2d8b32d4210463cee4422e277b3b4, the issue still occurs, which makes me suspicious of the other changes in that commit instead.
It's unclear why more users are not hitting this issue. I, and at least one other person (the OP of this ticket) seem to be. For my company we hit this on pretty much every single build making /console and /consoleFull unusable and lock up the user's browser, but we do not hit this on our older version of Jenkins or in my testing with workflow-job-plugin version 2.36 or earlier, or even on 2.37 with this change reverted. I'm not sure what the variable is, parallel branch pipelines maybe?
This also seems to affect more than just the client's browser:
From what I am actually seeing, the entire Jenkins instance is hurting
o.j.p.w.s.concurrent.Timeout#lambda$ping$0: Running CpsFlowExecution[Owner[test/6:test #6]] unresponsive for 6 min 45 sec
I am also hitting this issue when any of our pipelines has more than a few hundred KB of log. This is occurring for us on a brand new Jenkins server running the current LTS version 2.319.2 and the current Pipeline: Job plugin. Loading /console hangs for multiple minutes in the browser giving a warning about javascript: "This page is slowing down Firefox, stop this page?" When disabling javascript on the page, /console loads instantly for the build. Further debugging in the Jenkins Gitter channel with some Javascript profiling in Chrome I was also able to see org.jenkinsci.plugins.workflow.job.console.NewNodeConsoleNote/script.js:1 as being the likely culprit:
After finding this ticket, I also downgraded workflow-job from the current version (1145.v7f2433caa07f) to 2.36 and the issue no longer occurs, /console loads quickly. Upgrading just 1 minor release to 2.37 and the issue occurs again, so it seems like there was a change between 2.36 and 2.37 causing this. I'm not sure where the source for these releases are since the current source in Github starts at release 2.41.
I'm bumping this to Major since in our experience we can't load the console for any of our builds without the browser hanging, disabling javascript, or going to /consoleText and this occurs with the latest version of the plugin and the latest LTS jenkins release.
Here's some additional profiling of the page if it's helpful: