-
Notifications
You must be signed in to change notification settings - Fork 28
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
Deck detail page is slow and uncached #4926
Comments
Over 50 page loads taking more than a minute in the last three hours. |
In terms of reported slow pages this page is now dominating all others at something like 100:1 ratio. In an attempt to speed up the site in general I tried to slow down bots with f48e8dd. But making this page faster will surely have a good effect. |
If you disable redis ( |
At a guess, it'll get worse. Looking at the decks that are being reported, they tend to fall into two categories.
Tournament/imported decks are not appearing anywhere near as frequently. This tends to imply that the redis cache is working well, for the decks that are actually loaded into cache, and the slow pages are tending towards decks that aren't in redis. |
Deck detail page is no longer dominating slow pages as it was in June. Various perf improvements have changed a lot of the variables since then. /, /seasons/all/, /seasons/all/* and deck detail pages make up a lot of it, though. It occurs to me that we treat deck detail page as uncacheable because we show different views to admin/owner than we do to others when the deck is in a run BUT (a) the vast majority decks are not in a run, and (b) that's only two different views of the page not one-per-user or anything like that. Can we complicate our caching code to cache two versions of a page based on a switch and determine the value of that switch at cache-decision-time? |
It's definitely easy to add can_view as part of the cache key based on is_admin but is_owner seems tougher as there's not a very sensible way to access that kind of info from cache.py nor pass it in. Needs a bit of thought. |
While it would be great to cache based on a key of (url, locale, is_admin_or_owner) it's non-trivial and not the most pressing perf concern right now so backlogging. We should do this at some point though. |
Reported on Discord by bakert#2193
The text was updated successfully, but these errors were encountered: