On Fri, 17 Jan 2025 23:08:20 GMT, Vladimir Ivanov <vaiva...@openjdk.org> wrote:

> The synchronized scope was reduced from whole methods to sections that need 
> hash map access control. The tier1 and jaxp tests are OK. The score of the 
> specjvm2008:xml.transform improved a little bit. On the Xeon 8480+ reported 
> scores are:
> original: 1vCPU - 148.4, 112vCPU - 12743.4, 224vCPU - 13481.31 ops/m
> patched: 1vCPU - 149.77, 112vCPU - 13122.82, 224vCPU - 14751.57 ops/m
> 
> According to the JFR the locking time for XMLReader object reduced from 
> ~27sec to ~20sec for 224vCPU run.

src/java.xml/share/classes/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java
 line 53:

> 51:      * Cache of XMLReader objects
> 52:      */
> 53:     private volatile ThreadLocal<ReaderWrapper> m_readers;

It's not very common to see a ThreadLocal as an instance field but here it's 
more like a TL per XMLReaderManager instance. Is there any reason why this 
can't be eagerly created and use a final field here?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/23185#discussion_r1922437396

Reply via email to