New submission from marvin greenberg <public.marvin@...>:
The TRACE method in SRE_STATE.java has a comment saying "should get hot-spotted out". Unfortunately, it is called "poorly" in many instances, like,
TRACE(0, ptr, "copy " + lo + ":" + hi + " from " + mark_stack_base);
In this case, before the call, lots of StringBuilder operations occur. It also seems that in my use-case (with a not particularly long running VM that gets restarted a lot) that hot spot doesn't ever decide to optimize anything.
Profiling my code shows a huge amount of time spent (9s) in SRE_STATE.SRE_CHARSET() with all of that in TRACE(), StringBuilder.append,<init>, and toString().
These TRACE statements should be removed or actually commented out.
title: Expensive overhead from TRACE in SRE_STATE
Jython tracker <report@...>