dotnet / dotnet/project-system
Make sure ProjectFileWithInterception storage provider has a functional project instance model provider
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
CPS had made changes to retrieve project property values from project instance snapshot, instead of reading the project inside a read lock, if we have a functional storage provider of the property. Preventing using a project lock allows the code to run in any thread (including the UI thread), so it has less chance to run into project lock contentions, and less likely to be affected by thread pool exhaustion problems too. Internal property storage providers have been updated to support that. But the storage provider "ProjectFileWithInterception" doesn't support this, so properties backed by this provider don't get this performance benefit.
To address that, we need make sure the instance provider actually works correctly and returns the same value as the provider works with the project model. (The current implementation didn't do that correctly, some conversions are done in one provider but not the other one).
After that, set this metadata to the provider, which tells CPS that it can switch to the project instance model:
[ExportMetadata(ExportContractNames.ProjectPropertyProviders.Metadata.HasEquivalentProjectInstancePropertiesProvider, true)]
Contributor guide
Assessment
This issue has not been assessed yet.