On 4/6/13 1:14 PM, Andrej Mitrovic wrote:
On 4/5/13, Vladimir Panteleev<[email protected]> wrote:
I noticed that compiling D programs in the usual manner (rdmd) is
as much as 40% slower than it can be.
I've implemented the -rb and -rx switchex (the -r switch itself is
taken, it's an undocumented switch). These switches are used to enable
recursive builds and to exclude modules/packages, respectively[1]. The
-rx switch can take a module name or a wildcard option, e.g. -rxfoo.*
to exclude all modules from the package "foo".
I'm seeing about 30% faster clean builds when using DMD with this
feature compared to using RDMD. But I've only tested this on smaller
projects, I wonder what the impact is on larger projects.
The std and core packages, and the object module are implicitly
excluded from building.
[1] : https://github.com/AndrejMitrovic/dmd/tree/BuildRecurse
This is a dramatic improvement, and better build times are always well
received. Do you plan to convert your work into a pull request?
For larger projects I wonder if it's possible to restrict scanning only
to specific directories. That way building becomes a modularity enforcer.
Andrei