Commit 1d0dfd41 authored by Vincent Pelletier's avatar Vincent Pelletier

Disable activity creation-time traceack by default to fix performance tests...

Disable activity creation-time traceack by default to fix performance tests failing on object creation (~+40% increase !).


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22983 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5eb788bf
...@@ -97,6 +97,16 @@ def disableLogging(): ...@@ -97,6 +97,16 @@ def disableLogging():
global logging global logging
logging = False logging = False
activity_creation_trace = False
def enableActivityCreationTrace():
global activity_creation_trace
activity_creation_trace = True
def disableActivityCreationTrace():
global activity_creation_trace
activity_creation_trace = false
# Here go ActivityBuffer instances # Here go ActivityBuffer instances
# Structure: # Structure:
# global_activity_buffer[activity_tool_path][thread_id] = ActivityBuffer # global_activity_buffer[activity_tool_path][thread_id] = ActivityBuffer
...@@ -143,13 +153,13 @@ class Message: ...@@ -143,13 +153,13 @@ class Message:
self.exc_type = None self.exc_type = None
self.exc_value = None self.exc_value = None
self.traceback = None self.traceback = None
if format_list is None: if activity_creation_trace and format_list is not None:
self.call_traceback = None
else:
# Save current traceback, to make it possible to tell where a message # Save current traceback, to make it possible to tell where a message
# was generated. # was generated.
# Strip last stack entry, since it will always be the same. # Strip last stack entry, since it will always be the same.
self.call_traceback = ''.join(format_list(extract_stack()[:-1])) self.call_traceback = ''.join(format_list(extract_stack()[:-1]))
else:
self.call_traceback = None
self.processing = None self.processing = None
self.user_name = str(_getAuthenticatedUser(self)) self.user_name = str(_getAuthenticatedUser(self))
# Store REQUEST Info # Store REQUEST Info
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment