Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,8 @@ public async Task ProcessRequestsAsync<TContext>(IHttpApplication<TContext> appl
}
}

// This long-running method currently performs better with AggressiveOptimization, see https://github.com/dotnet/runtime/issues/133672.
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
private async Task ProcessRequests<TContext>(IHttpApplication<TContext> application) where TContext : notnull
{
while (_keepAlive)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Diagnostics;
using System.IO.Pipelines;
using System.Net.Sockets;
using System.Runtime.CompilerServices;
using Microsoft.AspNetCore.Connections;
using Microsoft.Extensions.Logging;

Expand Down Expand Up @@ -130,6 +131,8 @@ public override async ValueTask DisposeAsync()
_connectionClosedTokenSource.Dispose();
}

// This long-running method currently performs better with AggressiveOptimization, see https://github.com/dotnet/runtime/issues/133672.
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
private async Task DoReceive()
{
Exception? error = null;
Expand Down Expand Up @@ -263,6 +266,8 @@ bool IsNormalCompletion(SocketOperationResult result)
}
}

// This long-running method currently performs better with AggressiveOptimization, see https://github.com/dotnet/runtime/issues/133672.
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
private async Task DoSend()
{
Exception? shutdownReason = null;
Expand Down
Loading