Please try rdmd on large projects

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


I said:

>> 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.

but I did a:

    ltrace -e __xstat64 ./rdmd bla.d

and saw that rdmd doesn't recheck phobos, so SORRY nevermind what I said!!!!!!!!!!
And saw the inALibrary() function later.


But, even though rdmd now doesn't recheck phobos, "dmd --deps" does.


By the way, the .deps caching has two problems as it is right now in github:

1) BUG: the .deps should be rebuilt if the file changes.
   This misses the:  isNewer(root, exe)    part:

        // See if the deps file is still in good shape
        auto deps = readDepsFile();
        bool mustRebuildDeps = anyNewerThan(deps.keys, depsFilename);
        if (!mustRebuildDeps)

   So if a add an import to a dependency, the .deps get rebuilt,
   but if I add an import to the D file, the .deps don't get rebuilt,
   and the only solution is to delete de .deps file.
   And if the .deps file goes to the /tmp dir, someusers will miss that
   they have to delete the .dep file and get stuck.

2) The .deps file is thrown in the same directory as the D root file, instead
   of at /tmp. One might not have write access to the D script directory,
   just read access.

--jm


On 02/21/2012 02:17 AM, Juan Manuel Cabo wrote:
> Doing:
> 
>   ltrace -e open dmd -deps=outdeps.txt example.d
> 
> and:
> 
>   ltrace -e read dmd -deps=outdeps.txt example.d
> 
> shows that dmd opens and reads a lot of phobos and druntime
> to generate the dependencies of:
> 
>      import std.stdio;
>      void main() { writeln("something");}
> 
> --jm
> 
> 
>>




More information about the Digitalmars-d-announce mailing list