-
Notifications
You must be signed in to change notification settings - Fork 64
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
switch to CBOR #284
switch to CBOR #284
Conversation
This looks like it would be beneficial for MeshCat.jl too. We're currently doing some unnecessary base64 encoding in order to fit into json, but I'd love to just send byte arrays directly. |
We probably won't be able to get around base64 in general (it's required for Jupyter afaik - though there might be a way around that using the message buffers, though I'm unsure if that's available with IJulia or the Jupyter notebook client). We could have the conversion from binary to base64 happen in WebIO, dependent upon the provider, but that's somewhat complicated. |
I was thinking maybe we should just drop the whole plain text lowering, and simply show an empty webio instance, and sent it a message with the data it should append to the DOM... |
What's the strategy with Jupyter? It's unclear from the conversation so far... |
None :D So far I had 2 strategies in my mind: any provider can use their own serialization protocol, so Jupyter could just continue doing what it does... Or base64 encode this. |
Closing as stale. We talked about JSON3 at JuliaCon. |
CBOR is around 10x faster than JSON (see JuliaIO/BSON.jl#38) and can reduce size by a factor of ~2x.
This PR changes the websocket connection to use CBOR and should work fairly well already (WGLMakie runs without problems, which should use most of WebIOs features).
TODOs: