# HG changeset patch # User hannesw # Date 1453812360 -3600 # Node ID b49d0656c449d7598a90b200f821a14e9a2bf51a # Parent 4a652e4ca9523422149958673033e0ac740d5e1e 8148214: Slow object allocation due to multiple synchronization Reviewed-by: attila, mhaupt diff -r 4a652e4ca952 -r b49d0656c449 nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptFunction.java --- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptFunction.java Wed Jul 05 21:15:54 2017 +0200 +++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptFunction.java Tue Jan 26 13:46:00 2016 +0100 @@ -553,7 +553,7 @@ * @param prototype actual prototype object * @return property map */ - private synchronized PropertyMap getAllocatorMap(final ScriptObject prototype) { + private PropertyMap getAllocatorMap(final ScriptObject prototype) { if (allocatorMap == null || allocatorMap.isInvalidSharedMapFor(prototype)) { // The prototype map has changed since this function was last used as constructor. // Get a new allocator map.