There are too many unconditional global imports in phobos.
This unnecessarily slows down compilation, especially when only a single symbol of a module is needed. Recently I speeded-up dub [1] and found that just importing std.conv (only for to!string(__VERSION__)) already took ~150ms. Removing the import reduced the compile times for dub's compiler probe file [2] to ~3ms.
There are some ideas to make (static) imports lazy and we have some root to reduce the amount of work being done when importing a module (issue 13242).
We should still try to use more scoped (function-local) imports (better yet, scoped selective imports). Not only will this reduce compiles times for most D project, it also clearly specifies dependencies and helps to avoid no-longer used imports.
[1]: https://github.com/D-Programming-Language/dub/pull/388
[2]: https://github.com/D-Programming-Language/dub/commit/c9b685101cb5376d4ba4aa8ede4f8c9d346cd8de#diff-1c354aed609b1fe48ee6e2bb20fe396d
Comment #1 by dbugreporter — 2014-08-28T07:57:52Z
Beware of issue 10378 though. Using scoped imports means you have to be aware of every symbol in that module or you'll risk surprising behavior since there is no conflict detection.