Skip to content
Commit afd15d7c authored by Daniel Silverstone's avatar Daniel Silverstone
Browse files

_stream.py, _project.py: Manage GC during pipeline load



Since during pipeline load we are generating a lot of objects
which need to live for the duration of the BuildStream instance
there is benefit to disabling GC for the duration of the load since
that drastically reduces wasted CPU cycles iterating data which
will remain around always.  In order to limit the increase in
the peak memory consumption though, we do an explicit gc.collect()
after loading the YAML in, since without that, we use 60% more
memory at peak, and with it, only 20%.

Signed-off-by: default avatarDaniel Silverstone <daniel.silverstone@codethink.co.UK.>
parent 4a002bee
Loading
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment