You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found there is only json formmat could be shared between the rust main process and frontend. When sharing large amount of data, the serializing in backend and deserializing in fontend can lead some cost.
In my situation, I use backend rust code to run some render engine running in special thread itself, and send thousands draw calls command to the frontend, and then apply these draw commands by html5 canvas 2d/webgl.
I found that the json serializing become the bottle neck. I tried to change the binary command to base64 wrapped in json and send to frontend, It was really more fast, but the decode of json and base64 still cost some cpu. So I think how to only send binary data? So that the time of every frame cost could limited less than 16.7ms.
Describe the solution you'd like
sharing binary data between fontend and backend without endcoding and decoding.
Alternatives considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
The current webview api we use only supports json string payloads. v2 will have a new ipc backend (starting with a custom protocol which is currently also used to serve your distDir)
Describe the problem
I found there is only json formmat could be shared between the rust main process and frontend. When sharing large amount of data, the serializing in backend and deserializing in fontend can lead some cost.
In my situation, I use backend rust code to run some render engine running in special thread itself, and send thousands draw calls command to the frontend, and then apply these draw commands by html5 canvas 2d/webgl.
I found that the json serializing become the bottle neck. I tried to change the binary command to base64 wrapped in json and send to frontend, It was really more fast, but the decode of json and base64 still cost some cpu. So I think how to only send binary data? So that the time of every frame cost could limited less than 16.7ms.
Describe the solution you'd like
sharing binary data between fontend and backend without endcoding and decoding.
Alternatives considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: