jenkinsci/jenkins — pull request #706 by JoelJ (2013-02-14 02:23:29+00:00)
Title: Fixing the synchronize in Actionable#getActions() 

The Actionable#getActions() method only needs to be synchronized when lazy loading. After that, the synchronization is superfluous and impacts performance.
Since the field is volatile, the double-check block works in JDK5+. See http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html for more in
Analyzing various thread dumps, many threads (including requests) stall on this method waiting for the lock. Since the lock isn't necessary in most cases anyway, change it to only lock when the value hasn't been initialized.