On Mon, 29 Jan 2018 11:29:30 -0500, Steven Schveighoffer wrote:

On 1/29/18 11:05 AM, Martin Tschierschke wrote:

I just took the time and minimized my application to see, why the compilation time has increased.

So when doing
time dub build

[...]

But my real question is, why is compiling and linking taking approximately 7 seconds, a few versions before a much bigger application only took ~ 4 seconds.

[...]

I tried to reduce the number of vibe-d modules with:

  import vibe.http.router;
  import vibe.http.server;

Is everything needed? Like crypto? How to speed up compilation? The idea of splitting vibe.d was to speed things up, but the opposite has happen to me.

Have you tried compiling without checking for updates? Every time you
run dub, it checks online to see if there are changes that it may want
to download.

dub --skip-registry=standard

http://code.dlang.org/docs/commandline

Given that vibe.d has split, and depending on your internet speed, this
may be the cause.

-Steve

Thank you,
but the speedup is minimal to none in my environment.

The linking takes most of the time.
For me it looks like a lot of stuff is included in the libs and the linker is trying to remove parts/libs not in use?

How to avoid, that tls and crypto are used, they seam to be needless, in my example.


touch src/app.d && time dub build --skip-registry=standard

real 0m6.631s
user 0m5.876s
sys 0m0.704s

touch src/app.d && time dub build
real 0m6.679s
user 0m5.904s
sys 0m0.720s

touch src/app.d && time dub build --skip-registry=standard
real 0m6.989s
user 0m6.048s
sys 0m0.880s