dotnet / dotnet/msbuild

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

Open
#10,164 1 comment 2 reactions 0 assignees View on GitHub
Area: Server backlog Feature Request Priority:2 triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

### 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_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.