Commit 7c6f7af2 authored by Ross Patterson's avatar Ross Patterson

Use cProfile where possible for the

Control_Panel/DebugInfo/manage_profile ZMI view.  This has been
available since Python 2.5 and we no longer support Python 2.4 so
there's little reason not to use the faster profiler.
parent 5f72af23
......@@ -16,6 +16,9 @@ Bugs Fixed
since Python 2.5. This breaks Python 2.4 compatibility when the
publisher-profile-file configuration option is set.
- Use cProfile where possible for the
Control_Panel/DebugInfo/manage_profile ZMI view.
2.12.13 (2010-11-06)
--------------------
......
......@@ -386,7 +386,12 @@ def pm(module_name, stdin, stdout, stderr,
def publish_module_profiled(module_name, stdin=sys.stdin, stdout=sys.stdout,
stderr=sys.stderr, environ=os.environ, debug=0,
request=None, response=None):
import profile, pstats
try:
import cProfile as profile
profile # pyflakes
except ImportError:
import profile
import pstats
global _pstat
_plock.acquire()
try:
......
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