cake-build/cake

Cake Build Tool's Startup is Slow - 25s (64% overhead)

Open

#2,179 建立於 2018年6月3日

在 GitHub 查看
 (14 留言) (10 反應) (0 負責人)C# (3,742 star) (738 fork)batch import
Help wantedUp-for-grabs

描述

What You Are Seeing?

When I clone the example repo, and time the build command, there is A LOT of overhead time on the build even after repeated builds so it has had a chance to download everything and cache anything. That is, a lot of the time is spent loading cake and compiling the build script. See below for exact numbers.

What is Expected?

There should be less than a couple seconds of overhead from the build tool. 25s might be acceptable for a build on a build server, but it is unacceptable for a workflow where you repeatedly run the build locally each time you need feedback on compilation errors. You can't be waiting half a minute for every build to even start.

What version of Cake are you using?

v0.28.0

Are you running on a 32 or 64 bit system?

64 Bit

What environment are you running on? Windows? Linux? Mac?

Windows 7 Pro

Are you running on a CI Server? If so, which one?

No

How Did You Get This To Happen? (Steps to Reproduce)

  1. Clone the example repo
  2. Run a build ./build.ps1, ignore the timing of this build, it is downloading things for the first time etc.
  3. Run a second build using the powershell command to time it Measure-Command { ./build.ps1 -Verbosity Verbose -Verbose | Out-Host }

The end of the build output is:

Task                          Duration
--------------------------------------------------
Clean                         00:00:00.0557395
Restore-NuGet-Packages        00:00:02.5100364
Build                         00:00:07.7906003
Run-Unit-Tests                00:00:03.5055638
Default                       00:00:00.0071490
--------------------------------------------------
Total:                        00:00:13.8690890


Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 38
Milliseconds      : 407
Ticks             : 384074655
TotalDays         : 0.000444530850694444
TotalHours        : 0.0106687404166667
TotalMinutes      : 0.640124425
TotalSeconds      : 38.4074655
TotalMilliseconds : 38407.4655

You can see that Cake reported 13.8s total time. But powershell reported 38.4s total time. A difference of almost 25s. Almost all of which comes during the startup of cake. Repeated runs show similar results.

Your development machine may be faster reducing the pain, but it still shouldn't be 64% of the total time.

貢獻者指南

Cake Build Tool's Startup is Slow - 25s (64% overhead) · cake-build/cake#2179 | Good First Issue