_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:
Daniel Silverstone <daniel.silverstone@codethink.co.UK.>
Loading
Please register or sign in to comment