Twitter Upgrades To Load Tweets Five Times Faster

Twitter engineers have started an upgrade of the microblogging platform that will increase the page loading speed by an average of five times.

The performance boost is achieved by moving the rendering of the Twitter pages from the user’s browser to the server. Other changes include the disappearance of hashbangs (#!) from permalinks, and optimisation of the JavaScript code.

The upgrade will allow Twitter to take advantage of new browser technology and pave the way for fresh multimedia features.

Early bird gets the worm

Twitter, which has 10 million users in the UK, was built around a web application architecture that executed most of the code on users’ machines. According to the engineering manager of company’s web core team Dan Webb, the fully client-side architecture, while having a number of advantages, lacked support for various optimisations available only on the server.

Twitter decided to take the execution of JavaScript completely out of the render path. “By rendering our page content on the server and deferring all JavaScript execution until well after that content has been rendered, we’ve dropped the time to first Tweet [the amount of time it takes from navigation to viewing the first Tweet on each page’s timeline] to one-fifth of what it was”, said Webb.

The transfer to the servers also allowed Twitter to reduce differences in performance across browsers.

Another noticeable change is the simplification of permalink URLs, which will no longer use hashbangs (#!). “With hashbang URLs, the browser needs to download an HTML page, download and execute some JavaScript, recognise the hashbang path (which is only visible to the browser), then fetch and render the content for that URL,” explained Webb. Removing the need to handle routing on the client has contributed to the improvement in initial page-load performance.

Finally, by splitting the JavaScript into modules, engineers have enabled the client to only download the JavaScript necessary for the page to work, resulting in a smaller payload over the wire, fewer lines of code to parse and quicker execution times, Webb said.

Twitter will continue to roll out this new framework to the site in the coming weeks. Once the changes are in place, the company plans to implement partial page reloads and begin to overhaul the server side of the application.

Are you an expert on social networks? Take our quiz!

Max Smolaks

Max 'Beast from the East' Smolaks covers open source, public sector, startups and technology of the future at TechWeekEurope. If you find him looking lost on the streets of London, feed him coffee and sugar.

Recent Posts

Napster Sold And Will Return As Interactive Streaming Service

New chapter for famous name from Internet's early days, Napster, has been acquired and will…

7 hours ago

UK Proposes To Allow Satellites To Resolve UK Mobile Not-Spots

Solving not-spots? Ofcom proposal to make UK the first European country to allow ordinary smartphones…

9 hours ago

Waymo Confirms Washington DC Robotaxi Plan For 2026

Pioneering robotaxi service from Alphabet's Waymo to go live in Washington DC next year, as…

10 hours ago

US Adds 50 Chinese Firms To AI, Chip Blacklist

Dozens of Chinese firms added to US export blacklist, in order to hamper Beijing's AI…

12 hours ago

Tesla Europe Sales Plummet, As Owners Return EVs At Record Levels

Chinese rival BYD overtakes global revenues of Elon Musk's Tesla, as record number of Tesla…

14 hours ago

Signal App In Spotlight Amid Secret Chat Controversy Of US Officials

Messaging app Signal in the headlines after a journalist was invited to a top secret…

16 hours ago