-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Reduce channel overhead (GC pressure) #15
Comments
Channel overhead is ~17%. Good enough till someone says otherwise. |
Thanks a lot for FullDuplexStream! Testing WebSockets has never been so easy :) Look like DuplexStream On the happy path, there is no alloc in my code. I could see that in memory profiler and that's fine, but performance profiling is harder to digest. |
Hi @buybackoff. Thanks for sharing your results. I would love to correct this. It sounds like at least I can override |
The
MultiplexingStreamPerfTests
reveal that communicating the same data over channels is a bit more expensive in CPU, and significantly more expensive in terms of GC pressure. We should analyze the allocations and optimize anything we can with a goal of reducing allocations by at least 50%.To illustrate, running a simple JSON-RPC invocation over named pipes incurs this cost:
While running the same test except using a single channel over that same named pipe incurs 3.3K more allocations (10X the amount of the named pipe)!
The text was updated successfully, but these errors were encountered: