On Mon, 02 Sep 2013 18:08:26 GMT, Dylan Knutson wrote:

I've got a project which relies on Vibe.d as well as a few other dependencies, and I've noticed that compilation time is really, really slow now. Passing -v to dub has shown that Dub is compiling all of the project and it's dependencies' files at the same time.

Is there a way to get Dub to compile Vibe.d into vibe-d.lib, then link with that when I compile my own application, instead of building an unchanged Vibe.d each time?

Thanks,
--Dylan

It could be hacked that way by doing "dub build" for the vibe.d package and then using a modified package.json with "sourcePaths": [] and vibe-d.lib/.a added to the other library dependencies.

However, at some point DUB itself should automatically cache results for dependencies and also do proper partial builds when things have changed. But unfortunately everyone involved has been busy with other things lately, so that this hasn't materialized, yet.

Another thing you might try is to use the --rdmd flag and see if that helps a bit (probably not much, but sometimes it does). Also, if you are working on Windows, generated VisualD projects are set up to build separate static libraries for the different dependencies.