|
|
|
|
|
by lelandfe
1489 days ago
|
|
The tradeoff is exactly noticeable slowdown: https://imgur.com/a/y47haf9. Browser JS engines are single threaded, so MathJax has to wait its turn behind more important scripts, and it gets worse with slower devices and networks. It's a contest of download vs execution time, which a 2KB pre-rendered image will always win. You're right on the money with the server costs though. |
|
The JS interpreter is single threaded. But, you can offload the work to a web worker, that runs another instance of the interpreter in a separate thread.
Also for rendering LaTex it’s possible to optimize the rendering algorithm using WASM.
I’m not saying that MathJax does that, or it has good performance. But, there are options to optimize the client side rendering.