stefnotch / quantum-sheet

QuantumSheet - A user friendly mathematics worksheet and solver
https://stefnotch.github.io/quantum-sheet/
GNU General Public License v3.0
55 stars 5 forks source link

SharedArrayBuffer Messages #6

Closed stefnotch closed 3 years ago

stefnotch commented 4 years ago

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

stefnotch commented 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)