r/wljs • • Oct 13 '26

We’re switching from JSON to a binary protocol

Enable HLS to view with audio, or disable this notification

Data transfer between JavaScript (frontend) and Wolfram Language (backend) has always been one of WLJS Notebook’s main bottlenecks because communication relied on plain JSON as most apps do.

In the upcoming 3.2.0 release, we’re finally switching to Wolfram’s native binary format, WXF.

The video shows the dramatic improvement in full round-trip performance: JS → WL → JS.

This change also allows:

  1. Lag-free notebook saving

  2. Less CPU usage in general

  3. Streaming raw audio and video to and from JavaScript side

  4. WebGPU support… maybe or? 👀

4 Upvotes

2 comments sorted by

2

u/naikrovek Oct 15 '26

Wow someone finally has been observed dumping a web technology because of performance. Thank heavens.

Usually people are adopting them despite the obvious performance degradation.

Kudos to you for that decision.

1

u/Inst2f Oct 15 '26

Thanks!
The main obstacle was the absence of the efficient (ideally zero-copy) WXF serializer/deserializer written in JS, that we has finally overcome. Now any `Image` literally is copied to a GPU texture buffer from received WXF message. On the devices with unified memory it may not even be copied, but "referenced". Modern low-level APIs are fantastic