Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EvaluationContext.SharingPolicy.SharedSDKCache #9181

Merged
merged 2 commits into from
Feb 20, 2024

Conversation

ladipro
Copy link
Member

@ladipro ladipro commented Aug 29, 2023

Contributes to AB#1811625

Context

EvaluationContext is a container for various cached state, improving the performance of project evaluation. Sharing this state between evaluations is currently all-or-nothing, which has been identified as a blocker for wider adoption of EvaluationContext in Visual Studio scenarios.

Changes Made

Added a new SharedSDKCache sharing policy with the semantics of sharing only SDK resolutions. Specifically, it does not allow sharing of general file system state, which could lead to over-sharing when used during VS background processing.

Testing

Extended existing unit tests.

Notes

In retrospect, it may have been more appropriate to make SharingPolicy bit flags with each piece of cached data controlled by its own bit. But because changing the existing enum values would be a binary compat break, I'm opting for a new simple ordinal value.

@ladipro
Copy link
Member Author

ladipro commented Aug 29, 2023

@lifengl this change has a corresponding experiment VS insertion available here.

@ladipro ladipro marked this pull request as draft October 5, 2023 15:15
@ladipro ladipro force-pushed the ec-shared-sdk-cache branch from e016383 to b12386b Compare February 19, 2024 10:24
@ladipro ladipro marked this pull request as ready for review February 19, 2024 10:25
@ladipro
Copy link
Member Author

ladipro commented Feb 19, 2024

This is now ready for review.

Copy link
Member

@surayya-MS surayya-MS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@ladipro ladipro merged commit aa5b552 into dotnet:main Feb 20, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants