Skip to content

Improve script caching behavior #4471

Description

@GeertvanHorrik

Prerequisites

  • I have written a descriptive issue title
  • I have searched issues to ensure it has not already been reported

Cake runner

Cake .NET Tool

Cake version

latest

Operating system

Windows

Operating system architecture

x64

CI Server

N/A

What are you seeing?

We see script caching not working as we hoped. For example:

Run (according to build system): 39 seconds, but Cake logs show:

Task                          Duration            
--------------------------------------------------
Setup                         00:00:00.2121813    
Prepare                       00:00:00.2494064    
UpdateNuGet                   00:00:00.0003786    
RestorePackages               00:00:05.8670747    
Deploy                        00:00:01.2517940    
--------------------------------------------------
Total:                        00:00:07.5808350    

So theoretically 32 seconds can be shaved off.

I am currently adding logging to the script compilation (although this is on a much faster machine):

Without cache file:

Compilation took '00:00:01.5861141'

With cache file:

Loading script assembly from cache took '00:00:00.0036443'

I think this would be a nice addition to always log to the output window (I think people want to see this).

Will add more tracings and update this ticket.

What is expected?

N/A

Steps to Reproduce

N/A

Output log

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions