Skip to content
Commit 2f287380 authored by joeljohnson's avatar joeljohnson Committed by Kohsuke Kawaguchi
Browse files

Changing the sync to only sync before lazy loading the actions.

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 and requests stall on this method waiting for the lock. Since the lock isn't necessary in most cases anyway,
parent 27f1fd14
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment