Every request that comes from Jelly is checked against Permissions.
As result it leads to a call of `getId` method that produces the new string.
Usually it's not a problem, but in case of stop-the-world pause user requests are accumulated.
So, once pause is finished, we forcibly allocated tons of strings for
every request. That leads to new stop-the-world pause. (And this cycle
can repeat multiple times)

SCM/JIRA link daemon
added a comment - 2018-01-03 14:10 Code changed in jenkins
User: Alexander Akbashev
Path:
core/src/main/java/hudson/security/Permission.java
http://jenkins-ci.org/commit/jenkins/8fa79061bb0beaf93be4e05620463fd363ac5b30
Log:
[FIX JENKINS-48349] Cache permission id to avoid allocating of new strings
Every request that comes from Jelly is checked against Permissions.
As result it leads to a call of `getId` method that produces the new string.
Usually it's not a problem, but in case of stop-the-world pause user requests are accumulated.
So, once pause is finished, we forcibly allocated tons of strings for
every request. That leads to new stop-the-world pause. (And this cycle
can repeat multiple times)
(cherry picked from commit b2c40cb9e0db72c978b3a50be0d4c467cb33eb20)