[LinuxCNC/linuxcnc PR#381] Reduce memory usage in compile by specifying BOOST_PYTHON_MAX_ARITY

未分类 bolang 5个月前 (10-15) 32次浏览

Issue #381 | 状态: 已关闭 | 作者: jepler | 创建时间: 2017-12-15


This pull request reduces resource usage of a full LinuxCNC “make -j9”
* peak memory usage by 14.4%
* total task faults by 8.7%
* CPU time by 8.4%

On one particular file directly benefiting from the change, emc/rs274ngc/interpmodule.cc, the improvement was a reduction of:
* peak memory usage by 35.4%
* total page faults by 33.0%
* CPU time by 16.7%

It now takes (substantially) less than 512MB RAM to build this particular file on debian stretch amd64.

The cost of this change is that innocuous changes may require a higher BOOSTPYTHONMAXARITY (the number of arguments that may be involved in certain boost python functions, like boost::python::maketuple), and that might be non-obvious to a novice contributor.

I was prompted to make this PR due to @andypugh running into trouble compiling interpmodule.cc, which I surmised was due to inadequate RAM+swap.


评论 (1)

#1 – andypugh 于 2017-12-15

I was wondering if there was a connection.
Yes, I was compiling on a resource-restricted Udoo board.


原始Issue: https://github.com/LinuxCNC/linuxcnc/pull/381

喜欢 (0)