vlsi commented on PR #113: URL: https://github.com/apache/xalan-java/pull/113#issuecomment-1808387594
> If you happen to know of a trustworthy implementation that could be used from a regression test, I'd appreciate a pointer * https://github.com/mjiderhamn/classloader-leak-prevention/tree/master/classloader-leak-test-framework can ensure classes can be unloaded * https://github.com/openjdk/jol can inspect into object contents. For instance, `GraphLayout.parseInstance(...)`: https://github.com/openjdk/jol/blob/9d62009e97a1756ae91a16ab9e72f294efce17a9/jol-samples/src/main/java/org/openjdk/jol/samples/JOLSample_24_Arrays.java#L75C49-L75C49 or use java heap dump as an input. One can collect heap dump with `com.sun.management.HotSpotDiagnosticMXBean#dumpHeap` > Especially in hotspot JIT compilers, which can optimize differently every run. Again, specific proposals for reliable automatable metrics that we could add to our toolkit are welcome https://github.com/openjdk/jmh is the way to go. For instance, see https://github.com/pgjdbc/pgjdbc/blob/b49b61806f050ed13a255ad35449774297fad8c2/benchmarks/src/jmh/java/org/postgresql/benchmark/escaping/EscapeProcessing.java#L49-L53 > it's just nulling one field I might be wrong here, however, as `m_readers` becomes `null`, the subsequent calls to `getXMLReader()` become slower since they would have to create a brand new reader instead of reusing the previously cached one in the `ThreadLocal`. In other words, I believe this PR makes `ThreadLocal m_readers` useless. If the caching was not needed in the first place, then `ThreadLocal m_readers` should be removed. If the caching was needed, then this PR introduces performance regression. Of course, there's an option I am wrong, however, well, I am quite sure my analysis is right. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@xalan.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@xalan.apache.org For additional commands, e-mail: dev-h...@xalan.apache.org