Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR redesigns the way the Perseus app shell works, including adding full automatic support for proper hydration of initial loads. This increases the time-to-interactive of all Perseus apps by making it no longer dependent on a network request of any kind --- everything is now included in the initial HTML file the client gets (not including the JS and Wasm bundles, of course). This also reduces the amount of data that needs to be transferred over the network for subsequent loads, eliminates nearly all wrapper
<div>
s (making styling full-page layouts substantially easier), and substantially reduces the size of production Perseus bundles (files for subsequent loads are much lighter now).In testing with a development bundle, the basic example achieved 99 Lighthouse scores on mobile, the highest ever, so, with a production bundle of less than a fifth of the size, Perseus' performance on both desktop and mobile should be even better than it is today!
Note: this PR resolves the difference between using the
hydrate
flag or not to almost nothing in terms of performance.Fixes #173.