[PropertyInfo] Use a single cache item per method#30525
Merged
fabpot merged 1 commit intosymfony:masterfrom Apr 3, 2019
Merged
[PropertyInfo] Use a single cache item per method#30525fabpot merged 1 commit intosymfony:masterfrom
fabpot merged 1 commit intosymfony:masterfrom
Conversation
fabpot
approved these changes
Apr 3, 2019
Member
|
Thank you @deviantintegral. |
fabpot
added a commit
that referenced
this pull request
Apr 3, 2019
…ntintegral) This PR was merged into the 4.3-dev branch. Discussion ---------- [PropertyInfo] Use a single cache item per method | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #29977 | License | MIT | Doc PR | none Replaces #30523 with a rebase to master. This PR changes how property metadata is cached, significantly reducing the number of calls made between PHP and the backend cache. Instead of storing one cache item per method and set of arguments, a single cache item is stored per method. This matches well with real-world use, where most properties in an object will need to be inspected. Note that the absolute numbers in the above PR are best case. In production environments where memcache is on a remote server, we were seeing multiple seconds consumed by memcache calls. Commits ------- 2a4f8a1 [PropertyInfo] Use a single cache item per method
Contributor
|
This seems to have quite the opposite effect for me. Upgrading from 4.2.9 to 4.3.1: |
fabpot
added a commit
that referenced
this pull request
Jun 26, 2019
This PR was merged into the 4.3 branch. Discussion ---------- revert #30525 due to performance penalty | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | This reverts #30525, because it introduced a large performance penalty. Here is the effect of that PR when I upgrade my Api Platform project from 4.2.9 to 4.3.1: https://blackfire.io/profiles/compare/28bfbc61-3649-4896-bd03-7201239134cd/graph?settings%5Bdimension%5D=wt&settings%5Bdisplay%5D=landscape&settings%5BtabPane%5D=nodes&selected=Symfony%5CComponent%5CVarExporter%5CInternal%5CExporter%3A%3Aexport%403&callname=main() The reverted PR targeted master. This should go in 4.3? Commits ------- 3d37cc9 revert #30525 due to performance penalty
nicolas-grekas
added a commit
that referenced
this pull request
Jun 26, 2019
* 4.3: (34 commits) [PhpunitBridge] Read environment variable from superglobals [Bridge/PhpUnit] Fix PHP5.5 compat [PhpUnitBridge] More accurate grouping fixed CS Extract unrecoverable exception to interface [FrameworkBundle] Fix calling Client::getProfile() before sending a request Fix type error [Security/Core] require libsodium >= 1.0.14 [Workflow] re-add workflow.definition tag to workflow services [Security/Core] Don't use ParagonIE_Sodium_Compat revert #30525 due to performance penalty collect called listeners information only once [Lock] fix missing inherit docs in RedisStore [Messenger] fix retrying handlers using DoctrineTransactionMiddleware [Mailgun Mailer] fixed issue when using html body [HttpClient] fix timing measurements with NativeHttpClient [HttpClient] fix dealing with 1xx informational responses add test to avoid regressions fix mirroring directory into parent directory fix typos ...
nicolas-grekas
added a commit
that referenced
this pull request
Jun 26, 2019
* 4.4: (43 commits) [PhpunitBridge] Read environment variable from superglobals [Bridge/PhpUnit] Fix PHP5.5 compat [PhpUnitBridge] More accurate grouping fixed CS [Form] remove comment about to-be-removed method as it is used in master by ButtonBuilder Extract unrecoverable exception to interface [FrameworkBundle] Fix calling Client::getProfile() before sending a request Fix type error [Security/Core] require libsodium >= 1.0.14 [Workflow] re-add workflow.definition tag to workflow services [Security/Core] Don't use ParagonIE_Sodium_Compat revert #30525 due to performance penalty collect called listeners information only once [Lock] fix missing inherit docs in RedisStore [Messenger] fix retrying handlers using DoctrineTransactionMiddleware [Mailgun Mailer] fixed issue when using html body [Messenger] make all stamps final and mark stamp not meant to be sent [HttpClient] fix timing measurements with NativeHttpClient add return type declaration use proper return types in ErrorHandler and ArgumentResolver ...
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #30523 with a rebase to master.
This PR changes how property metadata is cached, significantly reducing the number of calls made between PHP and the backend cache. Instead of storing one cache item per method and set of arguments, a single cache item is stored per method. This matches well with real-world use, where most properties in an object will need to be inspected.
Note that the absolute numbers in the above PR are best case. In production environments where memcache is on a remote server, we were seeing multiple seconds consumed by memcache calls.