cake icon indicating copy to clipboard operation
cake copied to clipboard

[WIP] Improve assembly loading and performance

Open GeertvanHorrik opened this issue 6 months ago • 7 comments

For some background info, see https://github.com/orgs/cake-build/discussions/4476

This adds timings and makes sure the correct version of addins are loaded.

Here are some added timings that could be used to find where cake is taking time to initialize:

Analyzing build script...
Analyzed build script in 00:00:01.3645522
Processing build script...
Installing tools...
Installed tools in 00:00:09.3698166
Installing addins...
Installed addins in 00:00:01.4150037

This is on a fast machine, so installing the tools is the hardest part. A very easy win is to set a shared tools path for the build scripts so it doesn't have to re-install all the tools on each build.

Pinging @gep13 since he was part of the original discussion, but no need for anything just yet.

GeertvanHorrik avatar May 25 '25 18:05 GeertvanHorrik

To provide some context here, how many tools/addins are being restored for these timings? Have you got significantly more tools compared to addins?

gep13 avatar May 25 '25 20:05 gep13

Also.... what are the timing differences with this change implemented? Is there a significant difference with this change in place?

gep13 avatar May 25 '25 21:05 gep13

To provide some context here, how many tools/addins are being restored for these timings? Have you got significantly more tools compared to addins?

About ~ 8 tools, but these are large (800mb) because of full .net fx inclusion on some tools, which could cause it to be a bit more slow during extraction.

Also seem to get hit by a but where restoring packages does not seem to work with the latest alpha. Investigating the issue and will create a new PR for that as well.

GeertvanHorrik avatar May 26 '25 07:05 GeertvanHorrik

Also.... what are the timing differences with this change implemented? Is there a significant difference with this change in place?

No improvements yet, trying to figure out where the biggest wins are.

GeertvanHorrik avatar May 26 '25 07:05 GeertvanHorrik

For reference about the other issue I found: #4478

GeertvanHorrik avatar May 26 '25 07:05 GeertvanHorrik

Added #4500, will now continue working on this optimization.

GeertvanHorrik avatar May 26 '25 13:05 GeertvanHorrik

Caching in the %temp% is now working (when using pinned versions), shaving off approx 30 seconds per build. Now going to see if we can optimize a bit more.

GeertvanHorrik avatar Jun 05 '25 20:06 GeertvanHorrik