Giter Site home page Giter Site logo

Comments (3)

antrik avatar antrik commented on June 24, 2024

I just glanced over the code quickly, so I'm not entirely sure: but it looks like all the data is transferred in-line. There is no need to split up anything: just make sure large data blocks are transferred out-of-line instead. This avoids any size restrictions, saves memory (I think), and it's even faster on some architectures. (Not on x86 though AIUI, unless using large pages I guess...)

from ipc-channel.

antrik avatar antrik commented on June 24, 2024

Also, this problem can be worked around by not sending possibly very large things in the message directly, but rather setting up a shared memory region instead -- that's effectively the same as doing an out-of-line transfer on Mach.

The downside is that it's much more complicated to use. OTOH, it avoids the need to do serialisation when not strictly necessary, so it might potentially increase performance significantly.

It might be worth considering to use shared memory transparently for large messages in the platform-independent part of ipc-channel. This would allow simpler platform backends, as they would need no special handling for large messages this way...

from ipc-channel.

antrik avatar antrik commented on June 24, 2024

Summing up, I see three distinct ways to address this problem:

  1. Use out-of-line transfers in the macos backend.
  2. Transparently use shared memory for large transfers, in a platform-independent fashion.
  3. Punt to the caller -- the caller explicitly needs to use shared memory for transfers that might get very large.

Variant 2. is the most involved in terms of code changes, but might be the best approach in the long run -- not sure. 1. or 3. are easier short-term solutions, each with different trade-offs.

from ipc-channel.

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.