Skip to content

[Bug] Cache values of AppContext switches #2722

Description

@pmaytak

AppContext.TryGetSwitch statically caches internally but takes out a lock.
.NET almost always caches these values. They're not expected to change while the process is running unlike normal config.

Currently we don't cache values.

To-do:

  • Update all AppContext.TryGetSwitch to statically cache the value.
  • See if moving all context switches into one class for easier management would be helpful.
  • Run perf tests to compare difference.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions