Open hayesall opened 4 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
bump
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Describe the new feature or change to an existing feature you'd like to see
The current version of
amp-mathml
seems to be based on MathJax. This is a huge bottleneck for pages with lots of math. An alternative version based on KaTeX might fix this.Describe alternatives you've considered
The current implementation does work, but it doesn't deliver on the fast load times AMP intends to have.
Additional context
I cannot promise intend-to-implement I2I any time soon.
Benchmarks below.
The Benchmark
This benchmark is based on a summary of "Mirror Descent for Metric Learning: A Unified Approach" that includes 88 math blocks, mixed between inline blocks and equations.
Two versions of this web page were created:
amp-mathml
Reproducing
See this gist: https://gist.github.com/hayesall/33ba7aed8ebfbf0dba761cb7ba501342
amp-mathml
Preview of part of the benchmark page:
Benchmark 1:
amp-mathml
amp-mathml.html
All equations were rendered after around 22,000 ms:
Benchmark 2:
KaTeX
katex.html
There is some delay in the beginning between when I refreshed the page, but the rendering took place between 1000 ms and 1200 ms, or around 200 ms.