-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Avoid repetitive GCHandles in IIS WebSocket operations #48462
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
Conversation
src/Servers/IIS/IIS/src/Core/IO/WebSocketsAsyncIOEngine.Write.cs
Outdated
Show resolved
Hide resolved
What's the impact? Is it just allocations, or is there some perf cost to making the GC handle over and over? |
There’s a performance cost yes. This is from an internal customer |
Do the uncached operations get disposed? |
It shouldn't be possible to get uncached ones right? |
That's technically true, but the code isn't written that way. |
Would removing the |
I think so? |
Thoughts on new changes? |
This looks much easier to follow! |
@Tratcher Want to re-review? Or does your current approval still stand? |
Make the
AsyncIOEngine
in IIS disposable so we can avoid creating a newGCHandle
for every WebSocket read and write operation.