[Issue 18843] New: -deps -unittest causes cataclysmic memory usage
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue May 8 11:48:08 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18843
Issue ID: 18843
Summary: -deps -unittest causes cataclysmic memory usage
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: default_357-line at yahoo.de
In case you think I'm exaggerating:
echo 'import std.stdio; void main() { writeln("Hello World"); }' > helloworld.d
/usr/bin/time -v dmd -deps -unittest helloworld.d
[...]
User time (seconds): 27.24
[...]
Maximum resident set size (kbytes): 11550624
That's 11 gigabytes rss for Hello World.
The background issue is that -deps -unittest forces DMD to recurse into Phobos
unittests and all their imports, eventually semantically evaluating every
single unittest in Phobos.
Quickfur had a good proposal in https://github.com/dlang/phobos/pull/6159 ,
that may generalize to -deps: only consider files that are explicitly listed on
the command line. That may help.
--
More information about the Digitalmars-d-bugs
mailing list