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

Buffer writes from sources of synchronous writes #9015

Merged
merged 7 commits into from
Apr 18, 2019

Conversation

pranavkm
Copy link
Contributor

@pranavkm pranavkm commented Apr 3, 2019

Fixes #6397

* Require calling CopyTo to copy content to response stream
* Use PagedByteBuffer to buffer content in memory

namespace Microsoft.AspNetCore.WebUtilities
{
internal sealed class PagedByteBuffer : IDisposable
Copy link
Contributor Author

@pranavkm pranavkm Apr 16, 2019

Choose a reason for hiding this comment

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

@pranavkm
Copy link
Contributor Author

Before and after on the MVC Json scenario in Benchmarks (forgot to markdown):

RequestsPerSecond:           176,013
Max CPU (%):                 99
WorkingSet (MB):             193
Avg. Latency (ms):           1.6
Startup (ms):                381
First Request (ms):          223.58
Latency (ms):                0.86
Total Requests:              2,653,337
Duration: (ms)               15,070

RequestsPerSecond:           172,219
Max CPU (%):                 99
WorkingSet (MB):             192
Avg. Latency (ms):           1.67
Startup (ms):                452
First Request (ms):          303.34
Latency (ms):                0.71
Total Requests:              2,600,366
Duration: (ms)               15,100

@pranavkm
Copy link
Contributor Author

🆙 📅

Copy link
Contributor Author

@pranavkm pranavkm left a comment

Choose a reason for hiding this comment

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

🆙 📅

@pranavkm
Copy link
Contributor Author

@aspnet/build any idea what's up with the Windows build failure? I'm seeing it on all my PRs and I couldn't see a issue tracking it.

@dougbu
Copy link
Member

dougbu commented Apr 17, 2019

@pranavkm see #9477 which is @natemcmaster's work to address this issue.

@pranavkm pranavkm merged commit 92cae6f into master Apr 18, 2019
@pranavkm pranavkm deleted the prkrishn/write-buffer branch April 22, 2019 16:03
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fully buffer XML, JSON, and Razor request and ViewComponentResultExecutor response bodies
6 participants