waldyrious / rst-playground

Browser-based reStructuredText playground, built on Pyodide and docutils.
https://waldyrious.github.io/rst-playground
ISC License
1 stars 4 forks source link

Investigate ways to improve performance/responsiveness #22

Open waldyrious opened 1 year ago

waldyrious commented 1 year ago

There's currently a slight delay until the page is ready. It might be worth researching whether Pyodide allows pre-bundling modules so that they are loaded at the same time as the Pyodide script itself and not when the Python code is executed.

In any case, there is likely to always be a delay given the complexity of setting up a Python interpreter in the browser, so better UX for while the page isn't ready could also be a good idea.

waldyrious commented 11 months ago

One way to improve the page's responsiveness is to activate the input form as soon as JavaScript and WebAssembly support is detected, and only delay the activation of the convert button (or the start of auto-conversion, once #16 is done) to when Pyodide is ready. I have started playing with this locally, but need to find the time to clean up the changes and submit a PR.