The first chunk of information you see when you load a Wikipedia page—what they refer to as “the top of the fold” on a given entry—is loading about 400 milliseconds faster than it did earlier this month, according to Ori Livneh, a Principal Software Engineer at the Wikimedia Foundation. The median first paint time (the time it takes to get a first pass of content loaded on the screen, even if it’s not quite all there) has gone from about 1.2 to 1.3 seconds to about 0.8 or 0.9 seconds.
That may not sound like a difference that you would even notice, but Mr. Livneh said that the faster the site loads, the better the user experience in the places where Wikipedia’s content has the most gaps: the developing world.
“I really believe that if we’re to going to continue to recruit people to contribute to the pages it really needs to give people that user experience. It needs to not just be fast but delightfully fast,” Mr. Livneh said.
We spoke to Mr. Livneh during a recent phone call from his San Francisco office. Peter Hedenskog, a senior performance engineer, and a spokesperson, also participated.
For this new update, Wikipedia worked on how the site fed resources to browsers. Browsers need a number of resources to load a page: text, code and images, for example. Sometimes those resources have dependencies. For example, it doesn’t know what to do with the text until it has all the code. A browser tends to solve this problem by not loading anything until it has everything. It’s called render blocking. That’s why you stare at blank screens for a bit.
‘Wikipedia is an increasingly rare species. It allows you to relate to civilization in a more active, constructive way.’
In short, Wikipedia now tells browsers not to do that, and serves up the resources it needs for that first hunk of information, the top of the page, first, and asks that the browser goes ahead and loads it. It can then work on loading the rest while users digest the overview info at the top of the page. It’s moved to non-render blocking.
More deeply, Wikipedia now loads content asynchronously. In other words, the browser doesn’t have to do its work in a specific order. If it has to wait on the network to give it one piece of content, it can move to a different part of the page and load a piece that’s ready.
Mr. Livneh has posted a video showing the loading of a page before and after the update, side-by-side.
Engineers at the organization have been able to work on these improvements recently thanks to Real User Monitoring, which generates much more subtle information about what browsers and users are doing. The team made particular use of the Navigation Timing API, the Resource Timing API and the High Resolution Time API.
Wikis have always given users a sense of speed by reducing the number of steps between reading a page and editing it. “The notion that you could just go to a page, edit it in place, hit save and have that be the new version of the page, that was really exciting,” Mr. Livneh said of the early days of Wikipedia.
Mr. Livneh wasn’t always a performance engineer at the Wikimedia Foundation. He decided to move in that direction one day when he watched an engineer on Internet Relay Chat coaching a user of Arab language Wikpedia in workarounds for editing a page. The user had made edits locally, but he couldn’t get the contributions to save because his connection to the Internet kept timing out.
That’s what motivated Mr. Livneh to move into improving the site’s overall performance. In fact, late last year he rolled out updates that made edits save faster, directly addressing the Arab language users’ problems above.
The decade-long battle over how to spell ‘yogurt’ on Wikipedia.
American users of Wikipedia have a sense that the encyclopedia is complete, Mr. Livneh explained, because there is a page for everything they ever look for on there. It’s not, though. There is still loads of work left to do to make pages about the topics people care about in places where the Internet is newer, slower and spottier. Wikimedia staff are passionate about their work because they want to give everyone an opportunity to be part of creating websites. When users edit Wikipedia, they are participating in writing one of the top sites in the world.
The better the user experience is in those places where the site’s content has gaps, the organization believes, the more likely those gaps will be filled. That’s part of what motivated the team to pursue this project.
“Wikipedia is an increasingly rare species,” Mr. Livneh told us. “It allows you to relate to civilization in a more active, constructive way.”