Gareth White wrote:
> Let me know if you need me to provide any more information to make this
> a confirmed bug. Since the leak is fairly small I'll work around it by
> restarting the server once a week or so.
>
So I think I've tracked it down to a leak in the bzrlib.bencode.bencode
functionality. Specifically:
>>> from bzrlib import trace, bencode
>>> trace.enabled_default_logging()
>>> l = ['a string', {'a': 'dict'}, 234234, 'a really big string'*10000]
>>> trace.debug_memory()
WorkingSize 10636KB PeakWorking 10636KB
>>> for i in xrange(200):
... enc = bencode.bencode(l)
...
>>> trace.debug_memory()
WorkingSize 48996KB PeakWorking 48996KB
So memory went from 11M to 49MB.
Note that I don't see the same result for the bdecoder
>>> for i in xrange(200):
... m = bdecode.bdecode(enc)
...
>>> trace.debug_memory()
WorkingSize 49212KB PeakWorking 49212KB
As expected, bdecode only increased the memory ~ as much as the new 'm'
object.
Will dig further.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Gareth White wrote:
> Let me know if you need me to provide any more information to make this
> a confirmed bug. Since the leak is fairly small I'll work around it by
> restarting the server once a week or so.
>
So I think I've tracked it down to a leak in the bzrlib. bencode. bencode
functionality. Specifically:
>>> from bzrlib import trace, bencode default_ logging( ) memory( ) memory( )
>>> trace.enabled_
>>> l = ['a string', {'a': 'dict'}, 234234, 'a really big string'*10000]
>>> trace.debug_
WorkingSize 10636KB PeakWorking 10636KB
>>> for i in xrange(200):
... enc = bencode.bencode(l)
...
>>> trace.debug_
WorkingSize 48996KB PeakWorking 48996KB
So memory went from 11M to 49MB.
Note that I don't see the same result for the bdecoder
>>> for i in xrange(200): bdecode( enc) memory( )
... m = bdecode.
...
>>> trace.debug_
WorkingSize 49212KB PeakWorking 49212KB
As expected, bdecode only increased the memory ~ as much as the new 'm'
object.
Will dig further.
John
=:->
-----BEGIN PGP SIGNATURE----- enigmail. mozdev. org/
r7b8ACgkQJdeBCY SNAAMC3ACg0ZDcH egIVZykbAIqY/ CKo0Gz KYFy0RyFqEG6L16 Xe
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAks
dzQAoKcFZbAPvnR
=g2RX
-----END PGP SIGNATURE-----