gabrielfalcao/lettuce — Issue #194: huge memory consumption for big number of examples in outlined scenario
Author: nostre
Created: 2011-11-10 15:47:47+00:00
State: open

I've made a very simple 2-step scenario outline (go to an & see if

matches), and provided an extensive amount of examples (over 800). I noticed that lettuce is dying around 270-280 example, due lack of memory - at the moment when it dies it already has almost 2GB of ram - so over 7MB for each example.

I did some experiments and I noticed a simple relation - the more examples you have, the more memory it takes for each example. After doing some investigation it looks that the problem is with deepcopy in core.Step.solve_and_clone - with each example it is cloning the whole Step object, including things like the scenario (and whatever those things are referring to).

I guess the solution is to copy explicitly everything that is necessary, I just don't know what all those necessary things are, so I have problem fixing it by myself :)