Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MathJax freezing and consuming 100% CPU #439

Open
jagermesh opened this issue Apr 10, 2019 · 2 comments
Open

MathJax freezing and consuming 100% CPU #439

jagermesh opened this issue Apr 10, 2019 · 2 comments

Comments

@jagermesh
Copy link

MathJax become unresponsive and consuming 100% CPU on following LaTeX. Timeout setting does not help :(

const mathjax = require('mathjax-node');

mathjax.start();

equation = 'so\\ i\\ did\\ _{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{_{=-----------------------------------------------------------------------------------------------------------------------------------}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}9315';

mathjax.typeset(
  { math: equation
  , format: 'TeX'
  , svg: true
  , linebreaks: true
  , timeout: 10 * 1000
  }
, function (data) {
    console.log(data);
  }
);

Any ideas how to solve this?

@dpvc
Copy link
Member

dpvc commented Apr 24, 2019

This appears to be a problem in the line-breaking algorithm. Can you turn that off for this example?

@jagermesh
Copy link
Author

Well, it's user generated content through Equation Editor, so I can't predict what would it be. And for big texts I need line breaks :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants