First load takes a long time

AI-generated summary

The discussion centers on the slow first load time of Discourse, which typically takes 2–5 seconds without SSO and 6–7 seconds with SSO due to the additional round-trip to the SSO provider. SaraDev explains that this delay can be exacerbated by slow SSO providers, user device performance, or network conditions, and suggests ensuring adequate server resources (CPU, memory, network) to mitigate slowdowns. sok777 confirms experiencing high TTFB (Time to First Byte), which negatively impacts UX, and notes that even after a few hours away, the site behaves like a first load — suggesting caching may be too short-lived, forcing another 5–6 second wait. sok777 asks whether there are plans to improve this behavior, highlighting that despite being on a recent version, performance hasn’t improved, and EmberJS-related fixes mentioned in older threads have not resolved the issue.

Is there anything to do about the first discourse load taking a long time? (around 3s)
It seems that with SSO it’s even 6-7s.

I only found topics that mentioned EmberJS solving it but nothing has changed despite being on one of the latest versions.

The initial load time on a Discourse site (with an empty cache) is typically 2–5 seconds, and with SSO, a 6–7 second load is not unusual because the SSO round-trip adds at least one extra HTTP request.

When SSO is used, the first load requires a redirect to the SSO provider and back. If the SSO provider is slow, the entire login process can be slower for first-time or logged-out users.

Load times can also be dependent on connection speed and device performance on the user side.

Ensuring that your Discourse server is adequately provisioned in terms of CPU, memory, and network speed can sometimes help improve performance, as low resource availability can lead to poor load times.

Thank you @SaraDev for your reply.

Is there any plan to improve this?

from my experience TTFB is pretty large so the user feedback from a UX perspective is pretty bad.

Similarly, I find that the caching time is possibly too short? If I leave a discourse site for a few hours and comeback it refreshes the entire SPA as if it’s a first load, so it’s another 5-6 seconds to wait.