dotnet / dotnet/msbuild

Implicitly cache SDK resolvers and SDKs cross evaluations

Open
#6,987 1 comment 0 reactions 0 assignees View on GitHub
Area: Performance backlog triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 13h
Merged PRs (30d)
133

Description

### Issue Description

`EvaluationContext` currently contains a caching `SdkResolverService` as a field, meaning that the scope of SDK (and SDK resolver) caching is one evaluation unless the host explicitly creates a shared `EvaluationContext`. The work being done as part of initializing the resolver service has been flagged as a perf issue (ex: [AB#1364300](https://devdiv.visualstudio.com/0bdbc590-a062-4c3f-b0f6-9383f67865ee/_workitems/edit/1364300)).

It is unsupported to be changing the relevant files when MSBuild is running so we should look into implicitly caching resolvers and possibly also the resolved SDKs cross evaluations, in a process-wide cache for example.

### Data

See [AB#1364300](https://devdiv.visualstudio.com/0bdbc590-a062-4c3f-b0f6-9383f67865ee/_workitems/edit/1364300), [AB#1364293](https://devdiv.visualstudio.com/0bdbc590-a062-4c3f-b0f6-9383f67865ee/_workitems/edit/1364293), [AB#1370076](https://devdiv.visualstudio.com/0bdbc590-a062-4c3f-b0f6-9383f67865ee/_workitems/edit/1370076).

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.