-
Notifications
You must be signed in to change notification settings - Fork 528
Conversation
Throughput check still looking good (large async chunked requests) coreclr x64 private readonly byte[] bytes = Encoding.UTF8.GetBytes(new string('a', 1024));
public async Task Invoke(HttpContext httpContext)
{
// We check Ordinal explicitly first because it's faster than OrdinalIgnoreCase
if (httpContext.Request.Path.StartsWithSegments(_path, StringComparison.Ordinal))
{
for (var i = 0; i < 300; i++)
{
await httpContext.Response.Body.WriteAsync(bytes, 0, bytes.Length);
}
return;
}
await _next(httpContext);
}
Some occasional dips over a longer run (GC); though @halter73 had something for that. |
Probably additionally needs some way to bump up |
@benaadams I think increasing the ThreadPool's minimum threads is something that users will have to do themselves if they have to make a lot of sync calls. |
@halter73 yeah, don't think there is a facility to do it - will have a quick scan of https://github.com/dotnet/cli and raise issue if not. I think that's the right place? |
Raised issue for threadpool size https://github.com/dotnet/cli/issues/889 |
Code change feedback on the original issues so will be changing them rather than this. @halter73 feel free to close - though it has more info, like the code I ran for the tests and the results. |
@halter73 threadpool setting currently by switching the environment variable
|
The two PRs had merge conflicts, so this is them combined
SocketOutput exception completes all waiting tasks #567
Write chunks async; unblock sync-waits directly #586
Resolves #572
Resolves #565
Resolves #566
Resolves #590
Closes #567
Closes #586