-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rfc/issue 354 strict / SSG mode #396
Conversation
Here are some initial benchmarks from local testing in Greenwood and my personal website. Will complete with some stats of current performance in productions ProdNetworkLighthouseStats
Mode: StrictNetworkLighthouseStats
Mode: SPANetworkLighthouseStats
Summary
|
611014a
to
4d70f5d
Compare
In spa mode, I noticed an immediate reduction in Total Blocking Time when testing lighthouse in mobile mode. Which resulted in an increase score of performance 67. Not great but an improvement none the less. In ssg mode, those changes resulted in a performance score of 100 when testing lighthouse in mobile mode. |
12e83c6
to
cece625
Compare
Nearly a perfect lighthouse score on mobile and desktop. One issue I noticed, our "get started" button is now green again. Also footer is now messed up. This is apparent in strict mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From our meeting today, will make the following changes
- We'll stick with
async
for now - Will make
spa
the default option - Will rename it from mode to optimize
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code wise I think this is all ready, just need to make the follow up issues. Also updated the static POC branch PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related Issue
in support of #354, introduces a "strict" mode that strips out all client side JavaScript for projects that don't need any "runtime" JavaScript
Summary of Changes
<script>
tag asasync
Note this neat trick with inline
<script>
tagQuestions
TODO
strictspa mode default (the long term hope is that progressive mode would be the new default)Config
queryasync
ordefer
? I think in our casedefer
would work well for us? (avoid jankiness while hydrating mid load)async
setting? (Not sure ifasync
/defer
will work when serializing though...)<script>
tags in index.html - should beasync
too, or removed in strict mode?*.bundle.js
script tags in strict mode<lit-redux-router>
in strict mode (shaved off 5KB from index.html for Greenwood website!)Would like to look more into why our index bundle is so large or is it as optimized as it can be, for SPA mode. (maybe split out the webpack runtime? Might include reviewing the merits of our default babel config too.related issues:html minification #357 , improvements and optimizations for webpack CLI configuration #321, Dedupe content in JavaScript #305, asset and image compression (gzip / brotli) #235