use http-streaming instead of loading the whole document at first
@jakearchibald wrote a great article about the way githubs javascript lib (which is pjax) works and how it could be improved.
https://jakearchibald.com/2016/fun-hacks-faster-content/
maybe this is something which could improve performance under the hood. just to let you know...
Thanks for letting us know! It's clever, but still a huge hack. We're definitely interesting in using some streaming technology once it's available in browsers.
There's another issue going on here (which I left out of the reduced example in my post). When I view https://github.com/w3c/ServiceWorker/issues/920 the HTML is 4.4mb when I'm logged in. I think it's because it includes the edit form along with every comment.