Comments (3)
Channel overhead is ~17%. Good enough till someone says otherwise.
from nerdbank.streams.
Thanks a lot for FullDuplexStream! Testing WebSockets has never been so easy :)
Look like DuplexStream ReadAsync/WriteAsync
with ValueTask just use base Stream's virtual methods, which allocate a lot. I'm testing/profiling non-allocating code that uses .NET Core 2.1 zero-alloc path with ValueTask and there is a lot of noise. On the pic the profile of my code with 100% unhappy path (async state machine always allocates) and even there most garbage is from base Stream. It would be nice to have non-allocating implementation to test high perf non-allocating protocol stacks that use this corefx work: https://github.com/dotnet/corefx/issues/27445
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.
from nerdbank.streams.
Hi @buybackoff. Thanks for sharing your results. I would love to correct this. It sounds like at least I can override ValueTask ReadAsync
and ValueTask WriteAsync
methods to fix this. This particular issue was tracking GC pressure on the MultiplexingStream
in particular. Can you open a new issue to track this? I'll be happy to send you a candidate fix build for you to validate as part of this.
from nerdbank.streams.
Related Issues (20)
- Include copy of SequenceReader in netstandard2.0 build. HOT 3
- Synchronous StreamPipeReader HOT 4
- SequenceReader<T> declares members not found in netstandard2.1 HOT 2
- Thread safety issues related to PipeReader/PipeWriter completion and disposal
- MultiplexingStream faults when one channel's reader is faulted
- ServiceBroker.DisposeAsync can lead to a deadlock HOT 1
- MultiplexingStream significantly slower than raw stream access HOT 6
- MultiplexingStream.Channel.Input.CopyToAsync hangs when data exceeds window size
- Referencing Nerdbank.Streams activates Microsoft.VisualStudio.Threading.Analyzers for project HOT 1
- Way too many calls to pool rentals when MinimumSpanLength is specified HOT 2
- `await channel.Completion` followed by `mxstream.Dispose` deadlocks HOT 1
- nerdbank-streams `getBufferFrom` method can enter endless(?) spin-loop HOT 1
- ChannelClass doesn't work with DecodeStream backpressure correctly, which leads product to hang
- Hacked [email protected] HOT 1
- Incomplete Message Received When Sending Message Larger Than Buffer Size Using NamedPipes HOT 5
- SimplexStream doesn't allow zero byte reads HOT 5
- Opt-in support for the `WebSocket` wrapper(s) to send messages as "Text"? HOT 1
- `PipeWriter`-to-`WebSocket` can combine too many messages into one. HOT 3
- Add additional TFM to reduce dependencies HOT 3
- Optimise Dependencies for Newest TFM
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nerdbank.streams.