diff --git a/direct/src/showbase/ObjectPool.py b/direct/src/showbase/ObjectPool.py index 3bd874ed3d..acfd99696c 100755 --- a/direct/src/showbase/ObjectPool.py +++ b/direct/src/showbase/ObjectPool.py @@ -13,15 +13,16 @@ class Diff: def __init__(self, lost, gained): self.lost=lost self.gained=gained - def printOut(self): + def printOut(self, full=False): print 'lost %s objects, gained %s objects' % (len(self.lost), len(self.gained)) print '\n\nself.lost\n' print self.lost.typeFreqStr() print '\n\nself.gained\n' print self.gained.typeFreqStr() - self.gained.printObjsByType() - print '\n\nGAINED-OBJECT REFERRERS\n' - self.gained.printReferrers(1) + if full: + self.gained.printObjsByType() + print '\n\nGAINED-OBJECT REFERRERS\n' + self.gained.printReferrers(1) class ObjectPool: """manipulate a pool of Python objects""" @@ -102,7 +103,9 @@ class ObjectPool: print '\n============================' counts = list(set(self._count2types.keys())) counts.sort() - counts.reverse() + # print types with the smallest number of instances first, in case + # there's a large group that waits a long time before printing + #counts.reverse() for count in counts: types = makeList(self._count2types[count]) for typ in types: