Skip to content

perf: Use YamlDeserializer as singleton instance - #10567

Merged
yufeih merged 2 commits into
dotnet:mainfrom
filzrev:perf-use-singleton-yamldeserializer
Mar 3, 2025
Merged

yufeih merged 2 commits into
dotnet:mainfrom
filzrev:perf-use-singleton-yamldeserializer

Conversation

@filzrev

@filzrev filzrev commented Feb 26, 2025

Copy link
Copy Markdown
Collaborator

This PR intended to use YamlDeserializer as singleton instance.
Because YamlDotNet v16.1.0 or later support thread-safe deserialization by default.

What's changed in this PR

  1. Removed ThreadLocal instances and use YamlDeserializer singleton instance instead.
  2. Modify Docfx.YamlSerialization code for multi-thread call.

@yufeih yufeih added the performance Makes the pull request appear in "Performance" section of the next release note label Mar 3, 2025
@yufeih
yufeih merged commit 89a6426 into dotnet:main Mar 3, 2025
@filzrev
filzrev deleted the perf-use-singleton-yamldeserializer branch March 3, 2025 10:01
This was referenced Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Makes the pull request appear in "Performance" section of the next release note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants