Open dpoetzsch opened 6 months ago
This PR implements a huge performance improvement for large files with many html spans (e.g. links).
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).
Code Climate has analyzed commit 64835648 and detected 0 issues on this pull request.
View more on Code Climate.
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).