moved PStat import to top of file for more efficient profiling

This commit is contained in:
Joe Shochet 2006-03-15 21:53:46 +00:00
parent e6369ba5a4
commit 88d05089fe
1 changed files with 4 additions and 1 deletions

View File

@ -16,6 +16,10 @@ import string
import signal
from libheapq import heappush, heappop, heapify
if __debug__:
# For pstats
from pandac.PandaModules import PStatCollector
# MRM: Need to make internal task variables like time, name, index
# more unique (less likely to have name clashes)
@ -138,7 +142,6 @@ class Task:
def setupPStats(self, name):
if __debug__ and TaskManager.taskTimerVerbose:
from pandac.PandaModules import PStatCollector
self.pstats = PStatCollector("App:Show code:" + name)
def finishTask(self, verbose):