Issue1725

classification
Title: Expensive overhead from TRACE in SRE_STATE
Type: behaviour Severity: normal
Components: Library Versions: Jython 2.7
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: fwierzbicki, public.marvin, zyasoft
Priority: high Keywords:

Created on 2011-03-28.13:09:42 by public.marvin, last changed 2015-03-14.13:32:26 by zyasoft.

Messages
msg6458 (view) Author: marvin greenberg (public.marvin) Date: 2011-03-28.13:09:41
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.
msg9625 (view) Author: Jim Baker (zyasoft) Date: 2015-03-11.23:30:21
TRACE is probably useful, but I don't know the last time a developer has actually turned it on to do the comparison, and it's impacting users now and for quite some time. So we should comment out, and revisit.
msg9652 (view) Author: Jim Baker (zyasoft) Date: 2015-03-14.13:32:20
Fixed as of https://hg.python.org/jython/rev/28c98fa8978a
History
Date User Action Args
2015-03-14 13:32:26zyasoftsetversions: + Jython 2.7, - Jython 2.5
2015-03-14 13:32:20zyasoftsetstatus: open -> closed
resolution: accepted -> fixed
messages: + msg9652
2015-03-11 23:30:21zyasoftsetpriority: normal -> high
resolution: remind -> accepted
messages: + msg9625
2014-07-01 04:12:44zyasoftsetnosy: + zyasoft
2013-02-20 00:04:48fwierzbickisetpriority: urgent -> normal
nosy: + fwierzbicki
resolution: remind
versions: + Jython 2.5, - 2.5.2rc
2011-04-10 22:24:56pjenveysetpriority: urgent
2011-03-28 13:09:42public.marvincreate