Monday, October 31, 2016

What makes Google and Facebook pages load so quickly?


Facebook has a “Lazy Loading” system they call “BigPipe” that helps the pages load fast. Facebook breaks each page down into sections they call “Pagelets”, and using Javascript only load the most important Pagelets first then load the less important ones shortly afterwards.

 By loading and rendering the main page structure first with minimal info on it, the page appears to load quicker than having to wait for a complete page to download and then render.

Screenshot showing “Pagelets” in Facebook home page. Each blue highlighted rectangle corresponds to one pagelet.

They also break feed pages down into chunks, that load a few posts at a time, while you scroll the page down, this means they can show an almost never ending stream of data on a single page.

There is a description of Facebook’s “BigPipe” system here:

BigPipe: Pipelining web pages for high performance

Comment with your Facebook

No comments: