Giter Site home page Giter Site logo

Comments (3)

AArnott avatar AArnott commented on August 21, 2024

Channel overhead is ~17%. Good enough till someone says otherwise.

from nerdbank.streams.

buybackoff avatar buybackoff commented on August 21, 2024

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

image

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.

image

from nerdbank.streams.

AArnott avatar AArnott commented on August 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.