-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Switch opencollective images to self-hosted spritesheet #4318
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Munter
added
area: documentation
anything involving docs or mochajs.org
type: chore
generally involving deps, tooling, configuration, etc.
labels
Jun 8, 2020
craigtaub
approved these changes
Jun 8, 2020
boneskull
approved these changes
Jun 8, 2020
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.
LGTM if it's ready
… Caused render flush that resulted in confusing layout shift on reload
boneskull
approved these changes
Jun 10, 2020
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.
lgtm again. @Munter merge at your convenience; it's not clear to me if you're finished with this one.
boneskull
added
the
semver-patch
implementation requires increase of "patch" version number; "bug fixes"
label
Jul 29, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: documentation
anything involving docs or mochajs.org
semver-patch
implementation requires increase of "patch" version number; "bug fixes"
type: chore
generally involving deps, tooling, configuration, etc.
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.
After we added all our opencollective sponsors and backers to the documentation, the load time and the total download size of the documentation increased significantly. It can easily take several seconds to finish loading the opencollective images, despite them being on a CDN served on http2.
This network graph for our current situation looks like this:
There is no way for a user to opt out of downloading these 256 images at about 700kb in total.
Description of the Change
The opencollective fetcher script now downloads all sponsor logos and avatar images in order to self-host. A sprite sheet post process is added in order to reduce the amount of requests and further lossy compression is applied.
Improvements:
Here's a before and after comparison: https://www.webpagetest.org/video/compare.php?tests=200607_Z2_58f219880cacb17ae211d74b8e670c1c,200608_DX_cd846fd4961c94ad247dab95eaac76d8-r%3A1-c%3A0&thumbSize=200&ival=500&end=full
Alternate Designs
We could self host the individual images, but speed measurements showed less improvement than a sprite sheet.
Benefits
Faster time to final rendering of the top part of the documentation. Significantly less downloaded bytes
Possible Drawbacks
The backer image loading animation is replaced by a slightly less appealing raw image loading progress. On the other hand it's much faster.