-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
unnecessary PREG_OFFSET_CAPTURE usage (?) #110
Comments
Interesting, it looks like a leftover from the time I actually used the offset, now replaced with calculation via |
I've actually tried that, but the logic in the following |
@ViliusS @funkjedi the PR is merged now, and I also got another idea to make it even better using PCRE MARK verb. Unfortunately this will work in PHP 7+ only, so I'll merge it after figuring out the strategy to bump the required PHP version and modernize the codebase. My plan so far is |
Just wondering is
PREG_OFFSET_CAPTURE
is needed hereShortcode/src/Parser/RegularParser.php
Line 338 in 65d8b29
I don't see offset used anywhere in the following code however during tests I found that it uses up memory pretty heavily. If I did my testing right, in one case
preg_match_all()
uses up 80 MB withPREG_OFFSET_CAPTURE
and 23 MB without.The text was updated successfully, but these errors were encountered: