Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
fabpot merged 1 commit intosymfony:masterfromnicolas-grekas:cache-array
Jun 18, 2018

Conversation

@nicolas-grekas
Copy link
Member

@nicolas-grekasnicolas-grekas commentedJun 9, 2018
edited
Loading

QA
Branch?master
Bug fix?no
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PR-
  • skip key validation when key is already known
  • remove overhead inArrayCache::get() via inlining
  • don't store simple values in serialized format when not needed, preserving COW

Needs#27565 to be green.

@nicolas-grekas
Copy link
MemberAuthor

nicolas-grekas commentedJun 11, 2018
edited
Loading

(failure is a false-positive.)

if ('N;' ===$value || (isset($value[2]) &&':' ===$value[1])) {
$value =serialize($value);
}
}elseif (null !==$value && !\is_scalar($value)) {
Copy link
Member

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 ?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

correct, fixed

@stof
Copy link
Member

@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 ?

@nicolas-grekasnicolas-grekasforce-pushed thecache-array branch 3 times, most recently from7ce8c1d to8bb8e83CompareJune 14, 2018 11:26
@nicolas-grekas
Copy link
MemberAuthor

@stof done

@nicolas-grekas
Copy link
MemberAuthor

PR ready

@fabpot
Copy link
Member

Thank you@nicolas-grekas.

@fabpotfabpot merged commit92a2d47 intosymfony:masterJun 18, 2018
fabpot added a commit that referenced this pull requestJun 18, 2018
…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
@nicolas-grekasnicolas-grekas deleted the cache-array branchJune 18, 2018 16:13
@nicolas-grekasnicolas-grekas modified the milestones:next,4.2Nov 1, 2018
This was referencedNov 3, 2018
nicolas-grekas added a commit that referenced this pull requestDec 13, 2018
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
symfony-splitter pushed a commit to symfony/cache that referenced this pull requestDec 13, 2018
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
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof left review comments

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.2

Development

Successfully merging this pull request may close these issues.

4 participants

@nicolas-grekas@stof@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp