Bug 6171 – rdmd: cache dependency file to improve startup time [patch]

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-06-17T09:45:00Z
Last change time
2015-06-09T01:31:14Z
Keywords
patch
Assigned to
andrei
Creator
edelkind+puremagic

Attachments

IDFilenameSummaryContent-TypeSize
1002cache-deps.patchPatch for --cache-deps functionalitytext/plain4019

Comments

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
Commit pushed to master at https://github.com/D-Programming-Language/tools https://github.com/D-Programming-Language/tools/commit/89b863d3ad049ccf8dfa1e84f6846783dc6fe37b fix issue 6171 - rdmd: cache dependency file to improve startup time
Comment #3 by andrei — 2012-02-19T21:56:00Z
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?
Comment #5 by andrei — 2013-02-05T13:30:20Z
Yes, it's been fixed a while ago.