[Issue 16208] New: moduleinfo importedModules contains needless duplicates
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Jun 27 10:20:28 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16208
Issue ID: 16208
Summary: moduleinfo importedModules contains needless
duplicates
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: schveiguy at yahoo.com
When trying to debug a module cycle issue, I stumbled across the realization
that each time a module imports another module, that reference is added to the
list of imported modules, even if it's already there.
The compiler should eliminate these duplicates, as it slows down runtime
startup during module cycle detection, and bloats the executable.
Especially when idiomatic D code is supposed to import locally only when
needed. Each of these local imports adds another reference.
--
More information about the Digitalmars-d-bugs
mailing list