refcounter.py: prevent use of excessive RAM with large refs logs
authorCorey Farrell <git@cfware.com>
Fri, 27 Jun 2014 19:18:32 +0000 (19:18 +0000)
committerCorey Farrell <git@cfware.com>
Fri, 27 Jun 2014 19:18:32 +0000 (19:18 +0000)
commit9a495107b86b80a4bd804b2ddd7c4d7997ee6a3c
tree74c552f0d69b82de7b7329270b6a91177e004e45
parent15dcaeef82ce4fc013668392838f8ff9e0ec8075
refcounter.py: prevent use of excessive RAM with large refs logs

When processing a 212MB refs file, refcounter.py used over 3GB of RAM.
This change greatly reduces memory usage in two ways:

* Saving object history in whole lines instead of separated values.
* Not saving normal/skewed/leaked object lists unless they are requested.

ASTERISK-23921 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3668/
........

Merged revisions 417480 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 417481 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 417483 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@417485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
contrib/scripts/refcounter.py