I understand what you are tring to do here. complex preg_replace is very expensive.
How much ms did you manage to save with this code?
Netherless, i don't know if adding more options ... is the best way to achieve the goal.
Isn't there any way to optimize the regexs or for instance do a strpos before making the regex? Many pages don't have object or onclick or whatever... maybe some ms can be saved with this.
I understand what you are tring to do here. complex preg_replace is very expensive.
How much
ms
did you manage to save with this code?Netherless, i don't know if adding more options ... is the best way to achieve the goal.
Isn't there any way to optimize the regexs or for instance do a strpos before making the regex? Many pages don't have object or onclick or whatever... maybe some
ms
can be saved with this.check this for instance http://stackoverflow.com/questions/29726949/is-using-strpos-before-preg-replace-faster