You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found a strange bug in v6.6.8 that is seriously impacting performance during SSR. When the markdown contents have a specific combination of colons and HTML, it sometimes takes around 30-40 seconds to render (on a 2.6GHz i5 Mac Mini), and will occasionally completely freeze. It also pushes the CPU usage to 100% for the entire duration of the program.
We had some auto-triggered builds that were generating large static markdown sites, and the builds started to freeze and timeout since 6.6.8 was released. I've put together a simple example that is able to replicate this on a small scale:
index.js
importfsfrom'fs'importReactfrom'react'importMarkdownfrom'markdown-to-jsx'import{renderToString}from'react-dom/server'// renders immediatelyconstgood=`# This is a normal markdown file. <a href="/">Foo Bar</a>`console.log(renderToString(<Markdown>{good}</Markdown>))// takes a long time with high CPUconstbad=`Lorum *ipsum*: <a href="" style="float: right"><small>foo</small></a><span style="float: right"><small> </small></span><a href="" style="float: right"><small>bar</small></a>`console.log(renderToString(<Markdown>{bad}</Markdown>))
I haven't been able to nail down exactly which part of the bad markdown string is causing the issue, as removing different pieces will make the render time fluctuate--sometimes making it longer, sometimes shorter. It's weird. Downgrading to v6.6.7 fixes the issue.
The text was updated successfully, but these errors were encountered:
I've found a strange bug in
v6.6.8
that is seriously impacting performance during SSR. When the markdown contents have a specific combination of colons and HTML, it sometimes takes around 30-40 seconds to render (on a 2.6GHz i5 Mac Mini), and will occasionally completely freeze. It also pushes the CPU usage to 100% for the entire duration of the program.We had some auto-triggered builds that were generating large static markdown sites, and the builds started to freeze and timeout since 6.6.8 was released. I've put together a simple example that is able to replicate this on a small scale:
index.js
package.json
I haven't been able to nail down exactly which part of the bad markdown string is causing the issue, as removing different pieces will make the render time fluctuate--sometimes making it longer, sometimes shorter. It's weird. Downgrading to
v6.6.7
fixes the issue.The text was updated successfully, but these errors were encountered: