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
Markdown.ToHtml takes more than two minutes to complete when processing the 32K file from the attached archive. You can reproduce this by running the following program and passing it the path to the extracted file as a command line argument:
using System.IO;namespace Markdig.Run
{publicclassProgram{publicstaticvoidMain(string[]args){vartext= File.ReadAllText(args[0]);varpipeline=new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();
Markdown.ToHtml(text, pipeline);}}}
I believe this was addressed by the changes to the Abbreviation parser.
On 15.7, this loop seems to iterate over every character
EDIT:
Said loop iterates over each character in both versions, the master branch is just faster becuase of this check.
Basically, both versions, for each character loop over the remainer of the string => O(n^2), but the 15.7 version does a TextMatcher.TryMatch call for each of those inner iterations.
Markdown.ToHtml takes more than two minutes to complete when processing the 32K file from the attached archive. You can reproduce this by running the following program and passing it the path to the extracted file as a command line argument:
I'm using Markdig 0.15.7 and .NET Core 2.2.103.
Found via SharpFuzz.
The text was updated successfully, but these errors were encountered: