8000 Fast multiple setEx with the pipeline transcation (RedisAdapter::doSave) by masterklavi · Pull Request #18248 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Fast multiple setEx with the pipeline transcation (RedisAdapter::doSave) #18248

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

Closed
wants to merge 2 commits into from

Conversation

masterklavi
Copy link
Contributor
Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? no
Fixed tickets -
License MIT
Doc PR -

foreach ($serialized as $id => $v) {
$this->redis->expire($id, $lifetime);
if ($lifetime > 0) {
$pipe = $this->redis->multi(Redis::PIPELINE);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing \: \Redis

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, fixed.

@staabm
Copy link
Contributor
staabm commented Mar 21, 2016

did you profile how much faster it is?

@masterklavi
Copy link
Contributor Author

Yes. The new method is faster in ~4 times.

@theofidry
Copy link
Contributor

Is it possible to have a Backfire profile of it?

@nicolas-grekas
Copy link
Member

👍

@masterklavi
Copy link
Contributor Author

@stof
Copy link
Member
stof commented Mar 21, 2016

@masterklavi what we would need is a backfire comparison between profiles of the old code and the new code. This would be much easier to analyze than some code running both methods one after the other with different names.

@masterklavi
Copy link
Contributor Author

@nicolas-grekas
Co 9E69 py link
Member

Thank you @masterklavi.

@masterklavi masterklavi deleted the redis_dosave branch March 23, 2016 17:37
@fabpot fabpot mentioned this pull request May 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
0