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

Feature/145 protobuf streaming #153

Merged
merged 12 commits into from
Apr 15, 2023
Merged

Conversation

TimPurdum
Copy link
Collaborator

Closes #145

This is a large step forward in serializing graphics to JavaScript.

  • On the C# side we use the protobuf-net nuget package to annotate our GraphicSerializationRecord type and serialize it to a DotNetStreamReference
  • On the JS side we use protobuf.js npm package and a JSON type definition file to deserialize the graphics
  • All AddGraphics calls are chunked, and there is a default and user-controllable chunk size.
  • The logic is branched on the Blazor model
    • WASM in .NET 7 uses the synchronous JSImport methods instead of async calls
    • Server and MAUI launch multiple tasks for parallel work

@TimPurdum TimPurdum self-assigned this Apr 2, 2023
@TimPurdum
Copy link
Collaborator Author

Also in this PR, I moved all the Parent.RegisterChildComponent registrations to earlier in the Blazor life cycle, which avoids this happening on every render. There were some features that depended on this happening after render, however, such as registering layers and graphics from Markup, so you will see a new pattern in those places that register first, then render on the next OnAfterRenderAsync.

@TimPurdum TimPurdum requested a review from AndersenBell April 14, 2023 13:42
@TimPurdum TimPurdum merged commit 2a93202 into develop Apr 15, 2023
@TimPurdum TimPurdum deleted the feature/145_protobuf_streaming branch April 15, 2023 18:06
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 this pull request may close these issues.

Investigate ProtoBuf and Streaming to improve graphic serialization
3 participants