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

Performance improvement for large texts with many HTML spans #994

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dpoetzsch
Copy link

tl;dr;

This PR implements a huge performance improvement for large files with many html spans (e.g. links).

Full version

We recently had a case of a large markdown file (~2MB) including a table with ~4000 links. This took about 15-20s to process.

This PR fixes that by massively reducing the amount of string copies.

I added a performance test case that shows a speed improvement of about 2000%.

If this gets accepted, it'd be nice to also backport it to 2.x.x (which is easily done by rebasing this branch on 2.1.0 - no conflicts involved).

Copy link

codeclimate bot commented Jan 18, 2024

Code Climate has analyzed commit 6483564 and detected 0 issues on this pull request.

View more on Code Climate.

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

Successfully merging this pull request may close these issues.

1 participant