std.traits.fullyQualifiedName has been identified as a significant slowdown during compile time. The implementation does a whole ton of analysis to reconstruct the requested name.
The compiler already has this information though. Implementing as a trait and rewriting std.traits.fullyQualifiedName to use that will result in a solid speed up of compile times.
Comment #1 by b2.temp — 2019-02-13T05:55:22Z
I've added and tested such a new __trait. There are problems when using the raw output as produced by the compiler (Type.toPrettyChars(true) or DSymbol.toPrettyChars)
1. complex combinations of type qualifiers are not like expected by phobos unittests
2. template declarations include the constraints
3. handling of single template parameter (so w/o parens) is different
It's probable that toPrettyChars uses the header gen, which is not adapted to produce the fqn. It's rather used to format the errors.
But 80% of the tests pass.
There might be a way to use a modified toPrettyChars to produce the same thing. Basile-z can you be more specific in the differences?
Comment #6 by dlang-bot — 2022-12-18T02:02:07Z
@WalterBright created dlang/dmd pull request #14711 "fix Issue 16495 - __traits(fullyQualifedName) instead of std.traits.f…" fixing this issue:
- fix Issue 16495 - __traits(fullyQualifedName) instead of std.traits.fullyQualifiedName
https://github.com/dlang/dmd/pull/14711
Comment #7 by dlang-bot — 2023-01-22T05:35:11Z
dlang/dmd pull request #14711 "fix Issue 16495 - __traits(fullyQualifedName) instead of std.traits.f…" was merged into master:
- 4dc346fc31d69326c9c7d780c57c92c3a7fa9efe by Walter Bright:
fix Issue 16495 - __traits(fullyQualifedName) instead of std.traits.fullyQualifiedName
https://github.com/dlang/dmd/pull/14711