-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Better byte[] serialization in JS interop #30288
Comments
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
We currently Base64 encode binary data between .NET and JS. This is inefficient when dealing with large enough payloads. For example, for 1GB file we send more than extra 300MB of data over the network (which are all 0's) for Blazor server. Compression is not an option here due to CRIME and BREACH security concerns. For WebAssembly Base64 encoding and copying large amounts of memory between JavaScript and .NET Core via our JS interop is also problematic as it drastically degrades performance, which affects a wide range of multimedia applications. We want to find a better way of enabling WebAssembly to access native JS memory (ArrayBuffer, etc.) minimizing the copy and maximizing the efficiency. We can special-case binary data within our serialization and deserialization schemes to promote efficiency across blazor server and webassembly. |
OK, thanks for clarifying. I think we already have an issue for that: #21877 Can we close this one as a dupe? Or close the other one as a dupe, assuming you agree it's the same thing. |
Since this does appear to be a duplicate of #21877, I'll close it for clarity. But if I'm wrong, please let me know and/or reopen with details. |
Split out from #27885
@javiercn Can you please add details about what you think we should be doing here?
The text was updated successfully, but these errors were encountered: