html-integrations icon indicating copy to clipboard operation
html-integrations copied to clipboard

Kb 48270

Open xjiang-at-wiris opened this issue 1 year ago • 2 comments

Description

Optimized the performance of the viewer by implementing the following:

  1. 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.
  2. 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.
  3. 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

  1. Launch viewer on local yarn && nx build viewer && nx start html-viewer or in kitchen
  2. Try to put a lot of formulas, you can use this
  3. Ensure all mencioned before are working
  4. Try to modify new added parameters on table simultaneousmml simultaneouslatex vieweroffset

#48270

xjiang-at-wiris avatar Jul 02 '24 13:07 xjiang-at-wiris

I'm getting the following console errors on the viewer demo: image image

carla-at-wiris avatar Jul 05 '24 12:07 carla-at-wiris

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»

usantos-at-wiris avatar Jul 24 '24 14:07 usantos-at-wiris

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.

carla-at-wiris avatar Sep 09 '25 10:09 carla-at-wiris