Skip to content
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

Investigate ProtoBuf and Streaming to improve graphic serialization #145

Closed
TimPurdum opened this issue Mar 10, 2023 · 1 comment · Fixed by #153
Closed

Investigate ProtoBuf and Streaming to improve graphic serialization #145

TimPurdum opened this issue Mar 10, 2023 · 1 comment · Fixed by #153

Comments

@TimPurdum
Copy link
Collaborator

We have discussed many ways of improving the serialization and loading of large data sets

  • Use Protobuf serialization instead of JSON (smaller, faster)
  • Use DotNetStreamReference to pass data as a stream to JavaScript, and read graphics as they come in
  • Somehow gain access to the shared memory space between WASM and JS (for wasm only), and pass a pointer to the data
  • Combine several of the above, and abstract so that Blazor Server, WASM, and MAUI all work efficiently with the current API methods
@TimPurdum
Copy link
Collaborator Author

The main sticking point for all of the solutions above is that they do not support the blazor ObjectReference system. You cannot, without significant hacking, pass DotNetObjectReference to JS or JSObjectReference to C# via any of the systems except the built-in JSON serialization in IJSRuntime. This means that, in order to track and update graphics, we would have to

  1. fall back to our own custom registration dictionary and rewrite all the update calls like SetGeometry (again).
    OR
  2. have a separate callback to .NET that registers the JSObjectRefs at the Layer/View level.

I really don't like the idea of #1 above and moving further from the built-in object ref system. I am investigating the second idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant