msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

[Feature Request]: Cache RoslynCodeTaskFactory compilations for the lifetime of the Server

Open baronfel opened this issue 1 month ago • 0 comments

Summary

Inline tasks compiled with RoslynCodeTaskFactory are kept for the lifetime of the worker node process (or lifetime of a build?), but must be recompiled periodically. The Server implementation could keep these compilations around for a longer time, reducing the execution time of subsequent builds.

Background and Motivation

One of the goals of the Server node is to act as a host for all kinds of caches or lookups that need to be re-calculated often (within reason, and of course taking invalidation and correctness into account).

Proposed Feature

The Server node should compile and cache inline tasks and store them keyed by a hash of the code itself, as well as any additional references or command line arguments that went into the compilation. When the UsingTask is evaluated if no changes have been made, the node should be able to load the Task from the cached DLL.

Alternative Designs

No response

baronfel avatar May 21 '24 17:05 baronfel