Closed stefnotch closed 3 years ago
While this would work, it's not obvious whether this would improve the performance. Basically, we'd have to beat the performance of the browser's structured clone algorithm when transferring strings. (Or maybe even when transferring MathJSON)
Use
SharedArrayBuffer
+ some form of locking to pass messages to web workers. That way, nothing has to be copied and everything is always available.https://pyodide.org/en/stable/usage/api/js-api.html#PyProxy.getBuffer