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

Use new Grpc.Core.Api to get response headers only when requested #720

Merged
merged 3 commits into from
Jan 16, 2020

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Jan 14, 2020

Avoid allocating delegates per call, and only loads Metadata with response headers when response headers are requested by the user.

Will benchmark soon.

@JamesNK
Copy link
Member Author

JamesNK commented Jan 15, 2020

Before:

        Method |     Mean |     Error |    StdDev |     Op/s | Gen 0/1k Op | Gen 1/1k Op | Gen 2/1k Op | Allocated Memory/Op |
-------------- |---------:|----------:|----------:|---------:|------------:|------------:|------------:|--------------------:|
 SayHelloAsync | 10.24 us | 0.1889 us | 0.1767 us | 97,619.8 |      0.0916 |           - |           - |             7.11 KB |

After:

        Method |     Mean |     Error |    StdDev |      Op/s | Gen 0/1k Op | Gen 1/1k Op | Gen 2/1k Op | Allocated Memory/Op |
-------------- |---------:|----------:|----------:|----------:|------------:|------------:|------------:|--------------------:|
 SayHelloAsync | 9.354 us | 0.1853 us | 0.2474 us | 106,903.8 |      0.0763 |           - |           - |             6.66 KB |

@JamesNK JamesNK merged commit 8283efe into grpc:master Jan 16, 2020
@JamesNK JamesNK deleted the jamesnk/lazyresponseheaders branch January 16, 2020 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants