Skip to content
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

Time to first byte (TTFB) is very slow #1857

Open
tomodwyer opened this issue Feb 16, 2024 · 3 comments
Open

Time to first byte (TTFB) is very slow #1857

tomodwyer opened this issue Feb 16, 2024 · 3 comments

Comments

@tomodwyer
Copy link
Member

tomodwyer commented Feb 16, 2024

Currently the TTFB for OpenCodelists (from our monitoring service Freshping) is showing as 4375ms. When compared to Job Server, which is 212ms, this is very slow.

We should investigate what is causing this issue and attempt to mitigate it.

@madwort
Copy link
Contributor

madwort commented Feb 16, 2024

We currently have telemetry for opencodelists in honeycomb, although not with very much detail. For example, here is a trace of a recent request of / taking 4.198s

We could resurrect this PR #1194 to get a more detailed breakdown of what that request is doing in production, which I think should make it clear where we need to make improvements to get speedups.

@madwort
Copy link
Contributor

madwort commented Feb 16, 2024

nb. we do not have any honeycomb dashboards for opencodelists, you can find this data by going in Honeycomb to "Query", selecting the opencodelists dataset, & exploring!

@lucyb
Copy link
Contributor

lucyb commented Feb 20, 2024

I had a (very) quick look at this locally and I suspect it's the number of codelists in production that's causing the issue. With a fresh database the page loads very quickly. Only one query is performed on the index page for anon users, but that retrieves details about all codelists, which I imagine is now quite large.

It's worth noting that Django Debug Toolbar is enabled, but you need to add an extra environment variable to switch it on:
DDT_ENABLED=t just run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants