Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Cache] Improve perf of array-based pools#27563
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
05b84b1 to995cc8dComparenicolas-grekas commentedJun 11, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
(failure is a false-positive.) |
| if ('N;' ===$value || (isset($value[2]) &&':' ===$value[1])) { | ||
| $value =serialize($value); | ||
| } | ||
| }elseif (null !==$value && !\is_scalar($value)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
shouldn'tnull be serialized too ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
correct, fixed
stof commentedJun 14, 2018
@nicolas-grekas it seems to duplicate the same logic in ArrayAdapter and ArrayCache. Should part of it be moved to the ArrayTrait to be shared ? |
7ce8c1d to8bb8e83Comparenicolas-grekas commentedJun 14, 2018
@stof done |
nicolas-grekas commentedJun 15, 2018
PR ready |
fabpot commentedJun 18, 2018
Thank you@nicolas-grekas. |
…kas)This PR was merged into the 4.2-dev branch.Discussion----------[Cache] Improve perf of array-based pools| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -- skip key validation when key is already known- remove overhead in `ArrayCache::get()` via inlining- don't store simple values in serialized format when not needed, preserving COW~~Needs#27565 to be green.~~Commits-------92a2d47 [Cache] Improve perf of array-based pools
This PR was merged into the 4.2 branch.Discussion----------[Cache] Fix undefined variable in ArrayTrait| Q | A| ------------- | ---| Branch? | 4.2| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets || License | MIT| Doc PR |After upgrading my project to 4.2 my tests failed with a message that `$key` variable is missing here:https://github.com/symfony/symfony/blob/e81285249b780a11ed209a79fa77c1f6ea6da67b/src/Symfony/Component/Cache/Traits/ArrayTrait.php#L131 which seems to be introduced with PR#27563.So I added that variable to the trait and method calls (are there any other?). This is internal class so I guess noone is using it anywhere.Anyway, my tests pass with this fix.Commits-------b0b5937 Fix undefined variable in cache ArrayTrait
This PR was merged into the 4.2 branch.Discussion----------[Cache] Fix undefined variable in ArrayTrait| Q | A| ------------- | ---| Branch? | 4.2| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets || License | MIT| Doc PR |After upgrading my project to 4.2 my tests failed with a message that `$key` variable is missing here:https://github.com/symfony/symfony/blob/e81285249b780a11ed209a79fa77c1f6ea6da67b/src/Symfony/Component/Cache/Traits/ArrayTrait.php#L131 which seems to be introduced with PRsymfony/symfony#27563.So I added that variable to the trait and method calls (are there any other?). This is internal class so I guess noone is using it anywhere.Anyway, my tests pass with this fix.Commits-------b0b5937d1d Fix undefined variable in cache ArrayTrait
Uh oh!
There was an error while loading.Please reload this page.
ArrayCache::get()via inliningNeeds#27565 to be green.