Reading/Web/Projects/Performance/Lazy loading references

Hypothesis
Certain content doesn't necessarily need to be shipped to the user upfront and sometimes not at all. A good example are the list of references. We can remove this HTML from the initial page load and lazy load it if and when needed.

Prediction
Previous experiments had shown on the Barack Obama we could expect to see 10s removed from the fully loaded time at a small increase to TTFB. First render was unlikely to be impacted by such a change.

Method
MobileFrontend has a library called MobileFormatter which extends the HtmlFormatter in core. We used this to strip any elements in the HTML with the class references. On various good quality articles the size of this HTML is significant, e.g it accounts for 50% of all HTML in the Barack Obama article.

Due to a performance related change then went out the same day, which stripped srcset attributes from image tags in the page, we had to establish a new baseline. The configuration on the beta cluster was first updated to remove references. Later the change was reverted to retain the references list.

A script was used to calculate the median and average of values before the revert during a 5 day period and after the revert during the same specified period of time for a specified article (Barack Obama) on an emulated 2G connection.

The config changes were done sequentially and results were measured
 * On the beta cluster in the mobile stable and beta channels we stripped references. The change went into effect on 16th February 2016 at approximately 16:00
 * On the beta cluster in the mobile stable and beta channels references were re-enabled

The commands used to measure the impact of the change were: