Twitter Increasing The Speed At Which You Access Tweets

Developer & Design

Share this Post

I think Twitter is pretty fast and I bet most of the service's users do as well. Pretty fast is never good enough, however, so the microblogging site has gone back to the drawing board to make it even faster. The updates being implemented today are going to make Twitter faster than a file download in South Korea.

For a bit of background first, Dan Webb, Engineering Manager at Twitter, explains that the last major update to Twitter back in 2010 pushed all of the rendering onto the user's browser. It helped speed along some processes, but there are some things that only a server can accomplish. That's why the new Twitter is moving rendering back to the server. The most immediate change is that initial page load times should be one-fifth of what they were.

Sure, Twitter is faster now, but that can't be the only change, right? Of course not. Webb says that the new Twitter now runs on a new modular JavaScript application that will allow them to easily develop and add new features to Twitter. It also lets them take advantage of the explosive growth that we're seeing in Web applications thanks to HTML5.

There's more work going on under the hood over at Twitter besides performance upgrades and new JavaScript applications. You may have noticed that Tweet permalink pages no longer have the hashbang. The hashbang, which you may recognize as this little guy (#!), was a cornerstone of Tweet permalink pages everywhere. Turns out, however, that getting ride of the little rascal actually helped improve page-load speed.

The team at Twitter also looked at what they call "time to first Tweet." This is a measure of time that looks at how long it takes from clicking a link to viewing the first Tweet on a user's timeline. They found that people weren't seeing anything until the JavaScript was downloaded and installed. That caused a problem for older machines and older browsers. Instead of fixing JavaScript, they just got rid of it. The page will now load all the way and then begin executing JavaScript well after the user has already seen the first Tweet.

Speaking of JavaScript, Twitter has completely overhauled how it executes its code. First they minimized the amount of JavaScript that was actually being used. They found that the page was loading code that it didn't really need which only served to slow everything down. Now Twitter only loads up the code that it needs when it needs it dramatically decreasing the time it takes to load hilarious Twitter trends.

Twitter will continue working on improvements to make the site faster in the coming months. It's an exciting time for Twitter from both a user and developer point of view. The user gets the increased speed and developers get to see some exciting work from one of the biggest friends of the open source community.