

Ask HN: Anyone know why Twitter's initial page load has become so slow? - wuliwong

I don&#x27;t remember when I first noticed it but it has been on the order of months that anytime I navigate to twitter for the first time, there is an abnormally long load time. I was wondering if anyone else has noticed this and I was curious about what could be the cause? After the initial load, the site is as fast as usual.<p>I know they made a big deal about switching from Rails to Java but that was a couple years ago, I believe. Is it possible they moved to some front-end framework that requires a large initial payload to be delivered? I&#x27;m actually doubtful of that as it would have to be enormous to cause the type of delay I experience. I am a total dunce when it comes to security but I&#x27;ve wondered if it has to do with some kind of slowdown as a result of not handling SSL &quot;stuff&quot; well? This has been bugging me for a while now, so I thought I&#x27;d ask you fine folks if you&#x27;ve observed the same thing.
======
smoothwookie
I've experienced this too, and I imagine that the latency has to do largely
with the process of loading data from different shards into the cache.

This post from a few years ago notes that Twitter used to store the most
recent posts for your timeline within their Redis cluster, and MySQL was used
for long-term storage. If your account was not active within the cache, then
they needed to reload your timeline info. from long-term storage.

[http://highscalability.com/blog/2013/7/8/the-architecture-
tw...](http://highscalability.com/blog/2013/7/8/the-architecture-twitter-uses-
to-deal-with-150m-active-users.html)

I'm guessing that this is where the bulk of the latency is coming from, since
subsequent page loads on different devices don't exhibit the same degree of
latency.

~~~
wuliwong
I actually do remember something about that also. But, I've also noticed it
when I open an incognito tab, so I'm just going to their landing page and not
signed in.

------
Rifu
If you check the network tab when you visit twitter you'll notice that the
payload for the core twitter assets aren't that big, so you can scratch that
idea off.

