-
Notifications
You must be signed in to change notification settings - Fork 22
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
[Request] Improve plain text performance (getting bold and italics) #132
Comments
IIRC, parsing bolds and italics has some odd edge cases that make the processing slow. I'm not sure if I'll be able to improve it much. For now, if you don't mind bold and italic marks not being removed from the result, you can try adding the (There's a trade-off: the situation can certainly be improved for |
This branch was intended to improves bolds/italics performance (#132), but my test results do not show meaningful enough performance improvements to convince me to merge it into main branch.
This branch was intended to improves bolds/italics performance (#132), but my test results do not show meaningful enough performance improvements to convince me to merge it into main branch.
Closing as I could not think of other clever ways to improve the situation. I'm of-course open to suggestions or PRs. #133 helped a lot and is released as |
Thanks for taking the time to look into it! |
When taking the plain text of the Belgium page, more than half of the time is spent in
parsed.get_bolds_and_italics
, with most of that time spent inBOLD_ITALIC_FINDITER
. It seems like an obvious bottleneck, so it would be great to speed it up - either with a better regex, or a non-regex solution (maybe port the PHP code?).The text was updated successfully, but these errors were encountered: