8000 [HttpKernel] allow cache warmers to add to the list of preloaded classes and files by nicolas-grekas · Pull Request #36209 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[HttpKernel] allow cache warmers to add to the list of preloaded classes and files #36209

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

Merged
merged 1 commit into from
Apr 5, 2020

Conversation

nicolas-grekas
Copy link
Member
@nicolas-grekas nicolas-grekas commented Mar 25, 2020
Q A
Branch? master
Bug fix? no
New feature? yes
Deprecations? yes
Tickets -
License MIT
Doc PR -

This PR makes cache warmers responsible for returning a list of classes or files to preload. It does so by adding the following to WarmableInterface::warmUp():
@return string[] A list of classes or files to preload on PHP 7.4+

Of course, this return value is properly implemented so that we can see what this provides in practice. Here are the benchmarks on a simple Hello World rendered with Twig:

  • without preloading: 360 req/s
  • with preloading in master: 560 req/s (+55%)
  • with preloading and this PR: 630 req/s (+75%)

@nicolas-grekas nicolas-grekas force-pushed the bundle-warmup-preload branch 2 times, most recently from ea52a40 to b896527 Compare March 25, 2020 18:10
@nicolas-grekas nicolas-grekas force-pushed the bundle-warmup-preload branch from 1735544 to 8ab75d9 Compare April 4, 2020 09:53
@fabpot
Copy link
Member
fabpot commented Apr 5, 2020

Thank you @nicolas-grekas.

@fabpot fabpot merged commit 8a2a69f into symfony:master Apr 5, 2020
@nicolas-grekas nicolas-grekas deleted the bundle-warmup-preload branch April 5, 2020 16:59
@nicolas-grekas nicolas-grekas modified the milestones: next, 5.1 May 4, 2020
@fabpot fabpot mentioned this pull request May 5, 2020
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