On Saturday, 25 April 2020 at 10:35:49 UTC, Stefan Koch wrote:
On Saturday, 25 April 2020 at 10:17:50 UTC, Ali Çehreli wrote:
A colleague of mine has written dmdcache which may be very useful for some projects:

  https://github.com/seeraven/dmdcache

It drops our build time

  from 8 minutes
  to 45 seconds

on a particular build environment for about half a dozen D programs, one of which ends up being a 2G executable! WAT! :) And the total cache size is 5.5G. Wow!

This build is with dmd 2.084.1 and that one particular application uses tons of template instantiations most of which are in generated source code. If I remember correctly, 2.084.1 does not contain template symbol name improvements and that may be the reason for the large size.

Enjoy!

Ali

The main problem with this is that it does not take string imports into account, (or does it ???, I don't see how it could ....) Also the compilers output can depend on the timestamp at which the compilation was done.

Yeah, doesn't look like it which means it might not be useful in projects that does a lot of compile-time stuff.

There is no way to determine the import statements either as those themselves can be generated at compile-time.

I can see this being useful for large projects that does not use CTFE but other than that I think it might just create subtle bugs because you won't immediately know that some part of your code didn't update and isn't working as intended because the code for it was imported from another file etc.

Reply via email to