Skip to content

Pipelines fast-path, return single block outside of lock#36991

Closed
benaadams wants to merge 1 commit into
dotnet:masterfrom
benaadams:return-single-block-outside-of-lock
Closed

Pipelines fast-path, return single block outside of lock#36991
benaadams wants to merge 1 commit into
dotnet:masterfrom
benaadams:return-single-block-outside-of-lock

Conversation

@benaadams
Copy link
Copy Markdown
Member

@benaadams benaadams commented May 25, 2020

MemoryBlock.Dispose() is a significant portion of AdvanceReader; add a fast path so when there is a single BufferSegment return that inside the lock and return the MemoryBlock outside; leaving the lock and triggering the callback early.

image

After for Json the majority use the new path:

image

@benaadams
Copy link
Copy Markdown
Member Author

Revist post 5.0

@benaadams benaadams closed this Aug 2, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants