goessner / markdown-it-texmath

Support TeX math equations with your Markdown documents.
MIT License
156 stars 28 forks source link

slow build for vuepress serve when using markdown-it-texmath #13

Closed songololo closed 4 years ago

songololo commented 5 years ago

I am not sure if this would be a vuepress or markdown-it-texmath issue. Vuepress is a static site generator that uses markdown-it to render HTML content.

The vuepress dev server starts-up really slowly when using markdown-it-texmath, though regular builds (for production) are not as slow. It seems that they are using webpack-dev-server under the hood. After the initial build, subsequent refreshes are quicker, i.e. they seem to be using some sort of cache.

I'm not sure how to go about debugging this, but any ideas on what the hold-up might be or suggestions for where to look?

songololo commented 5 years ago

I've created a minimal example here: markdown-katex-debug.

And opened a similar issue in the katex repo: https://github.com/KaTeX/KaTeX/issues/1865

janvorisek commented 5 years ago

I ran into the same issue. Build almost freezes with webpack-dev-server using default vuepress dev. Finishes after 30 min.

songololo commented 5 years ago

@janvorisek I'm not aware of any solutions to above but the new vuepress-plugin-mathjax might work for your purposes?

janvorisek commented 5 years ago

@songololo Yeah that one is working, but i personally prefer KaTeX as it's faster, resulting math is partially selectable and it supports tagging using \tag.

I just found out that mathjax supports at least equation numbering which I need so thank you anyway :-)

Hopefully someone will fix the issue soon so we can switch to KaTeX.

goessner commented 4 years ago

I do not use vuepress and don't intend to do so in near future.

So I definitely need your help here with that issue ... some new insights ?

Thanks

goessner commented 4 years ago

Closed due to inactivity ... can be reopened again.