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

Fix NamespaceCache usage in System.Private.Xml.Linq #101158

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -880,8 +880,8 @@ internal async Task ReadContentFromAsync(XmlReader r, LoadOptions o, Cancellatio

private sealed class ContentReader
{
private readonly NamespaceCache _eCache;
private readonly NamespaceCache _aCache;
private NamespaceCache _eCache;
private NamespaceCache _aCache;
Copy link
Member

Choose a reason for hiding this comment

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

It looks like this occurred as part of moving these from being locals to being fields as part of d88ba5b#diff-b2b608017bdbacf5e4484368d6e1fcb03a9ea3b68f4aece41da253f72826acf9R908. Would they be better again as locals? I'm not sure why they were moved to be fields, but they're increasing the size of the ContentReader object by being here.
cc: @krwq

private readonly IXmlLineInfo? _lineInfo;
private XContainer _currentContainer;
private string? _baseUri;
Expand Down
Loading