[PropertyInfo] Use a single cache item per method#30523
[PropertyInfo] Use a single cache item per method#30523deviantintegral wants to merge 1 commit intosymfony:3.4from
Conversation
9700ee0 to
fa65dfa
Compare
|
The patch looks good to me. |
|
However, it should target master, we don't consider performance fixes as bug fixes. |
One case we found is that if a new webserver is added to a pool due to autoscaling, having memcache + APC is useful in reducing first-load times. Thanks for the review. I will open a new PR so this is available in case anyone in the future wants to patch this in. |
…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 symfony/symfony#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 ------- 2a4f8a11d4 [PropertyInfo] Use a single cache item per method
…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
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.
It's not clear to me if performance improvements fall under "bug fix", though I will say that we would have had to rewrite our code to remove PropertyInfo without this change.
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.