Skip to content
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

Use string replacement instead of regexp in TemplateProcessor::setValue() for increased performance #716

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

btry
Copy link

@btry btry commented Jan 28, 2016

Hi

This code has a better performance compared to preg_replace. Unfortunately, it is less readable because not all internal string manipulation functions can handle UTF-8.

Here are some screenshots of XDebug's profiler before my change

image

and after

image

Thanks for this great library.

@troosan troosan changed the title 10% performance gain in TemplateProcessor::setValue() for limited replacement Use string replacement instead of regexp in TemplateProcessor::setValue() for increased performance Dec 27, 2018
@PowerKiKi PowerKiKi changed the base branch from develop to master November 16, 2022 21:11
@Progi1984 Progi1984 force-pushed the master branch 3 times, most recently from 2d9f999 to e458249 Compare August 30, 2023 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants