On Thursday, 14 August 2014 at 12:56:10 UTC, Rikki Cattermole
wrote:
On 15/08/2014 12:47 a.m., Vladimir Panteleev wrote:
On Thursday, 14 August 2014 at 11:54:57 UTC, Rikki Cattermole
wrote:
Atleast from my experience with this, its dmd thats actually
taking
the time.
I can't glean this from looking at the code, but are you
recompiling the
entire program? Web development is a perfect fit for
incremental
compilation, so when changing one web page's template or view
code, you
should need to compile only one .d file.
ld and gold seem to support incremental linking, that could
help speed
things up as well.
Dub automatically handles caching of dependencies such as
vibe-d. So they are not rebuilt.
The only things that get recompiled for example is a single
code unit. This is defined as being the dependency between a
route file and template files (simplified).
The necessary dependencies such as vibe-d then should be added
as part of the build process.
Incremental builds of things such as routes and templates are
not a good idea. Same goes for data models. It could change the
code unit output a little too much. Possibly even cause a
corrupt binary from missing symbols ext.
But in this case none of this matters much. Pretty much I'm
only testing against a single route module. No dependencies
outside phobos and vibe-d.
My experience with these sort of things suggests that it'll be
the linker taking the time. Dynamic libraries are the solution.
Dub needs proper support for dynamic library dependencies.