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

Improve quoteColumnName() performance #17345

Merged
merged 2 commits into from
Jun 7, 2019
Merged

Conversation

brandonkelly
Copy link
Contributor

When profiling a long-running request, we noticed that yii\db\Connection::quoteColumnName() was a particularly heavy hitter. By memoizing its results, we were able to take it from 1.77s down to 131ms.

Here are the Blackfire profiles:

Before ➡️
After ➡️

Q A
Is bugfix? no
New feature? no
Breaks BC? no
Tests pass? no

@samdark samdark added this to the 2.0.21 milestone Jun 7, 2019
@samdark samdark added the status:ready for merge The pull request is OK to be merged. label Jun 7, 2019
@samdark
Copy link
Member

samdark commented Jun 7, 2019

Please add a line for changelog.

@brandonkelly
Copy link
Contributor Author

@samdark Done

@samdark
Copy link
Member

samdark commented Jun 7, 2019

Merged. Thanks!

@samdark samdark merged commit 60702e6 into yiisoft:master Jun 7, 2019
@brandonkelly brandonkelly deleted the quote-boost branch June 7, 2019 22:27
sdlins pushed a commit to sdlins-forks/yii2 that referenced this pull request Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready for merge The pull request is OK to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants