html-integrations
html-integrations copied to clipboard
Kb 48270
Description
Optimized the performance of the viewer by implementing the following:
- Added an Interaction Observer to avoid rendering all functions on the page simultaneously. Instead, it renders only the currently visible functions and some that are just outside the viewport.
- Added a Mutation Observer to render newly added functions individually instead of re-rendering the entire page. This also allows for the quick conversion of LaTeX to MathML.
- Enabled concurrent rendering of multiple functions within a set upper limit, ensuring all visible functions on the page are rendered in parallel.
Steps to reproduce
- Launch viewer on local
yarn && nx build viewer && nx start html-vieweror in kitchen - Try to put a lot of formulas, you can use this
- Ensure all mencioned before are working
- Try to modify new added parameters on table
simultaneousmmlsimultaneouslatexvieweroffset
I'm getting the following console errors on the viewer demo:
Hey, remember to add the decode so this work ! 😊«math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mfrac»«mrow»«mi»r«/mi»«mi»e«/mi»«/mrow»«mi»w«/mi»«/mfrac»«mi»r«/mi»«/math»
Closing this PR: the task is more complex than expected. The Q goal work (services, SDK, and viewer analysis) is a prerequisite to pursue the improvements.