Comment #0 by edelkind+puremagic — 2011-06-17T09:45:46Z
Created attachment 1002
Patch for --cache-deps functionality
The attached patch is quick and dirty, but you get the idea. Instead of
unconditionally regenerating the deps file, apply this patch and use the
--cache-deps option to rdmd. Startup time is improved dramatically.
Notes:
- The deps file is checked to ensure that it's newer than the target.
- All dependencies (modules) are still checked. If none of them have
changed, then none of the dependencies would have changed, either.
- If a dependency changed and the object needs to be recompiled, then the
deps file is regenerated as well.
Patch is against tools.git version 6085e8521653ea031508444759cf37bbc3342245.
Comment #1 by edelkind+puremagic — 2011-06-17T10:29:44Z
I should note that the temporary-object-file cache directory is probably a more sensible place for the cached deps file. This way, the deps file can be cached even if the source directory is not writable.
Given such improvements, i think that rdmd could become a useful, efficient substitute for popular scripting languages.
Comment #2 by github-bugzilla — 2012-02-19T21:51:28Z
Implemented an independent solution. Indeed the speed gain for cached builds is dramatic - 6x. Currently the deps file is not saved in the temp dir.
Comment #4 by andrej.mitrovich — 2013-02-05T13:21:53Z
(In reply to comment #3)
> Implemented an independent solution. Indeed the speed gain for cached builds is
> dramatic - 6x. Currently the deps file is not saved in the temp dir.
Can we mark this as fixed?