-
-
Notifications
You must be signed in to change notification settings - Fork 549
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
Command statamic:stache:warm
does not warm everything
#11352
Comments
That doesn't seem to make a difference. |
Could this be caused by the order of the console commands? Running |
The issue can be reproduced by clearing everything and just running |
Did you ran stache:doctor? If you visit a couple of pages and run it, it will show you indexes that are used in queries, but are not available in stache:warm. You have to configure them in the stache config so stache:warm will know what indexes to create. |
Bug description
While using
php artisan statamic:stache:warm
on a fairly large repository of ours I noticed one odd or two odd things. Note that I ran into this because I'm debugging awfully slow rendering/caching times, talking 10 seconds plus.The first thing is that there are 2740 queries (Debugbar) on the first page visit when nothing is cached. Those each take around 20μs but there also hundreds of
select * from entries where id = ?
queries that take 200μs to 250μs but no biggie, those will only be executed once and we can usephp artisan statamic:stache:warm
to get warmed up and avoid that they pop up. That's where we noticed something odd and we basically have 2 scenarios in which we can reproduce this:php artisan statamic:stache:warm
and see the 2740 queries with a total render time of 11s. On the second visit we only see 125 queries with a total render time of 1s. This is what we would expect since the 2740 queries moved some things into the stache.php artisan statamic:stache:warm
and then visit the page in hopes of only encountering the 125 queries. We are still seeing 1154 queries with a render time of 6s. On the second visit we only see 125 queries with a total render time of 1s. This was a bit unexpected since we were hoping thatphp artisan statamic:stache:warm
would eliminate all of those queries.Is there some obvious reason for the difference in how those queries are cached by visiting the page vs. using
php artisan statamic:stache:warm
in that case? We are seeing 8-14 seconds caching times per page when deploying and after adding some logging we noticed thatphp artisan statamic:stache:warm
not warming everything is part of the problem.How to reproduce
Have a repository with 6 sites and 1200+ pages. I can't provide a reproduction repository due to it being private but could invite a team member to it.
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
The text was updated successfully, but these errors were encountered: