mir-algorithm
mir-algorithm copied to clipboard
Mir Algorithm takes an absurd amount of memory to build
In the process of building Mir Algorithm's unittests, I'm frequently running into situations where dub
exits with -9
(indicating that my system has run out of memory). After further examination, dmd
is using 6+ GB of RAM when trying to build the unittests (this is also with -lowmem
).
This is killing me over here -- I only run a MBP with 16 GB of RAM (subject to upgrade), and I'm getting spurious build issues due to running out of memory.
How is ldc2 with -lowmem
? You can turn off most of the tests. They are wrapped with version
.
LDC has the same problem (spikes up to 7 GB before running into an OOM):
Disabling the unittests under version (mir_test)
fixes this, but this problem is a huge pain...
@hatf0 When I'm developing on mir-algorithm (yesh, it has been a while), I usually change the unittests that are relevant to me (including new ones) to some other version specifier and only run dub test for that as I need it. This particularly works well for orthogonal new features.
Admittedly, it might make sense to create a separate tests folder and move anything that is not a documentation unit test to that folder. Another approach might be to give the documentation unit tests a separate version identifier so that you can test with some smaller coverage.