-
Notifications
You must be signed in to change notification settings - Fork 31
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
Improve the speed of parsing markdown input five times #482
Conversation
I took a closer look at the local function depth_first_search(node, path, visit, leave)
visit(node, path)
for label, child in pairs(node) do
if type(child) == "table" then
depth_first_search(child, path .. label, visit, leave)
else
visit(child, path)
leave(child, path)
end
end
leave(node, path)
end It needs to be called with an empty string as its second parameter: Since I can't edit this PR directly, feel free to commit this change, and let's see what the CI tests have to say about it. |
Thanks, simpler is better. I will test out your code on Monday at the latest. Perhaps we can get rid of the |
As far as I know, you can create your own fork of this repository and open a second-order PR that would merge into the branch However, you don't need to: With your permission, I will use your code from #482 (comment) and commit it with a by-line that states that it is your contribution. This way, GitHub will register the commit as your contribution as well. |
As discussed in <#482 (comment)> and below. Co-authored-by: Tim Taubitz <[email protected]>
As discussed in <#482 (comment)> and below. Co-authored-by: Tim Taubitz <[email protected]>
c188c4b
to
6eff522
Compare
b5b8774
to
3e8fe8a
Compare
I verified on my Dell G5 15 notebook that after commit 6eff522 from this PR, the
In commit 3e8fe8a, I added a test that the
Since updating the parser has been sufficient for fixing the speed issue, I postponed the removal of the dependency on |
This PR applies the significant speed improvements from Witiko/markdown#482.
This PR applies the speed improvements from <Witiko/markdown#482>.
This PR makes the following changes:
parsers.punctuation
using prefix trees.This change will close #474.
Following a successful CI run, this PR should repeat the experiment from #474 to see if this has sufficiently improved speed the speed of the Markdown package. If so, then we should also make the following changes:
markdown-cli
command finishes under 1 second in the CI.If not, this PR should continue by making the following changes:
parsers.punctuation
to a separate Lua file.UnicodeData.txt
.These changes will close #458 and continue #402.