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

NettyIoThread should implement ContextMapHolder #2083

Merged
merged 1 commit into from
Feb 9, 2022

Conversation

idelpivnitskiy
Copy link
Member

Motivation:

#1910 could not change
io.servicetalk.transport.api.IoThreadFactory.IoThread to extend
ContextMapHolder to keep it backward compatible. But the internal
NettyIoThread must implement ContextMapHolder. Otherwise, all
netty threads go through slow path of managing AsyncContext.

Modifications:

  • NettyIoThread implements ContextMapHolder;

Result:

All instances of NettyIoThreads go through the fast path of operating
with ContextMap.

Motivation:

apple#1910 could not change
`io.servicetalk.transport.api.IoThreadFactory.IoThread` to extend
`ContextMapHolder` to keep it backward compatible. But the internal
`NettyIoThread` must implement `ContextMapHolder`. Otherwise, all
netty threads go through slow path of managing `AsyncContext`.

Modifications:

- `NettyIoThread` implements `ContextMapHolder`;

Result:

All instances of `NettyIoThread`s go through the fast path of operating
with `ContextMap`.
@idelpivnitskiy idelpivnitskiy self-assigned this Feb 9, 2022
@idelpivnitskiy idelpivnitskiy added the performance Optimizes performance or reduces overhead label Feb 9, 2022
@idelpivnitskiy idelpivnitskiy merged commit e33e1f4 into apple:0.41 Feb 9, 2022
@idelpivnitskiy idelpivnitskiy deleted the context-map-holder branch February 9, 2022 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Optimizes performance or reduces overhead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants