[twill] Memory leak issue

Titus Brown titus at caltech.edu
Thu Mar 2 07:57:07 PST 2006


On Thu, Mar 02, 2006 at 01:23:50PM +0300, Alexander Shvedunov wrote:
-> Hello,
-> 
-> It seems that twill has a memory leak problem. Run this really simple python
-> script:
-> 
-> from twill import commands
-> for i in range(10000)
->   commands.go('http://localhost')
-> 
-> and watch the memory usage of a python process... while you can... =)
-> 
-> Do you know how can it be fixed?

Well, it's kind of a "feature".  Didn't I tell people not to use
loops in twill? ;)

Seriously, this just happens 'cause the history stores each response
object.  I'll add a 'clear_history' command; what do people think about
putting in a (configurable) history size limit?  It's a bit more work,
but it's easy enough to do.  I'm just not sure it's needed...

cheers,
--titus



More information about the twill mailing list