Please try rdmd on large projects

Juan Manuel Cabo juanmanuel.cabo at gmail.com
Mon Feb 20 21:02:34 PST 2012


GOOD!

Is the missing chmod problem fixable? So that the
binary has the same permissions as the D file?
If my D file is not readable or runnable by 'other',
the binary shouldn't be either. (the cached .deps should
have the same readability as the D file too perhaps).


I think that this is the big timesaver:

     rdmd: cache dependency file to improve startup time

So: Big Thanks!! I was using a wrapper for rdmd that only
called rdmd if the file was modified (which worked great for
small one file scripts, those 300ms to 1000ms startup
delays where unbearable).
With the .deps caching, rerun time went down to 20ms.
It was 300ms ~ 1000ms before (depending on how many imports).

I think that 20ms is still too slow (for certain applications,
it is just too much).

When rdmd asks dmd to generate the dependencies of my_file.d,
dmd goes beyond and parses phobos files, opening
all the module files in the path of dependency. I think
that was the major slow part.

Is it possible to have an option to skip rechecking inside phobos
dependencies each time? That would be the thing that brings
it down to < 5ms.

--jm


On 02/20/2012 07:17 PM, Andrei Alexandrescu wrote:
> Hello,
> 
> 
> I just submitted (https://github.com/D-Programming-Language/tools/commit/c77b870fdc5674d7434b03d1767ba831eaac25b1) a
> change to rdmd that runs one thread per stat when comparing file dates, using David's excellent std.parallelism.
> 
> In my experiment the change introduces no additional lag on small projects and works 10-15% faster on moderate projects
> (couple dozen deps).
> 
> Could someone try rdmd against some larger projects and assess its behavior and speed?
> 
> 
> Thanks,
> 
> Andrei



More information about the Digitalmars-d-announce mailing list