Skip to content
New issue

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

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

Already on GitHub? # to your account

Don't allocate AttributesCollection in HtmlNode unless needed #558

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lahma
Copy link

@lahma lahma commented Jun 29, 2024

Calling HtmlNode.GetId and others can cause attribute collection construction, changing to check whether there are attributes before accessing the allocating Attributes getter.

@lahma lahma force-pushed the dont-allocate-in-getid branch from 0dcba7d to d5c0caf Compare June 29, 2024 09:27
@lahma lahma force-pushed the dont-allocate-in-getid branch from d5c0caf to 235be93 Compare June 29, 2024 09:41
@lahma lahma changed the title Don't allocate AttributesCollection in HtmlNode.GetId unless needed Don't allocate AttributesCollection in HtmlNode unless needed Jun 29, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant