Open colinodell opened 3 years ago
I'm removing the v2.1 milestone as I've already tested a number of expressions and am fairly happy with the current state of things. However, I'll keep this open in case any regex experts want to dig deeper and maybe find something that I missed.
regexes with lots of alternations could be optimized like the one I link to
several alternations could be reduced by combining similar ones into optional atomic groups, but readability and maintainability go down the toilet and break the sewers. However, I cannot find where that specific regex is used.
This library makes heavy use of regular expressions. While most of them should be fairly performant, there could certainly be some room for improvement to help improve the performance of this library. Examples of improvements might include:
Tools that could help here include:
A partial list of areas where regex is used in this library include:
BlockStartParserInterface::tryStart()
BlockContinueParserInterface::tryContinue()
InlineParserInterface::parse()
InlineParserMatch
builds regular expressions, which are then used byInlineParser
I will accept (almost) any PR that aims to improve performance, though I would ask that you keep the following in mind: