= Background information
Time to first paint is slower on mobile-html than mobile web according to PageSpeed Insights.
Compare mobile-html:
https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fen.wikipedia.org%2Fapi%2Frest_v1%2Fpage%2Fmobile-html%2FDog
to mobile-web:
https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fen.m.wikipedia.org%2Fwiki%2FDog
This was consistent across all pages tested.
= What
Speed up page load and time to first paint for mobile-html
= How
Investigate suggestions from pagespeed insights, talk to the mobile web team, make recommended adjustments
= Potential ideas
**Not a todo list, just ideas for discussion**
- Create a shell page capable of loading page content separately. The shell page would have the theme and margins applied, then the pre-processed parsoid content would be loaded separately.
- Async the pagelib script tag. This probably won't improve anything since the clients need the pagelib JS to make theme and margin adjustments.
- Add others here as they are discovered
= Completed changes
- Read setup settings and interaction handler from preset JS values and apply margin and theming at the top of the body tag, defer all other changes and apply them after the document loads https://gerrit.wikimedia.org/r/c/mediawiki/services/mobileapps/+/534531
- Minify the pagelib css https://github.com/wikimedia/wikimedia-page-library/pull/244