Decrease the thumbnail resolution in sphinx-gallery for performences#17275
Decrease the thumbnail resolution in sphinx-gallery for performences#17275sciunto wants to merge 1 commit intomatplotlib:masterfrom sciunto:sphinx
Conversation
| # Default thumbnail size (400, 280) | ||
| # Default CSS rescales (160, 112) | ||
| # Size is decreased to reduce webpage loading time | ||
| 'thumbnail_size': (280, 196), |
There was a problem hiding this comment.
Why a factor of 1.75 instead of 2? Not sure of the practical benefit of this since our hosting provider compresses the pngs for us, but it looks fine even at 1.75...
There was a problem hiding this comment.
Visually, it would be too much.
There was a problem hiding this comment.
Not sure I follow... There are lots of high-DPI/retina displays in the wild, so CSS 160 is really 320 pixels and hence a factor of 2 makes sense.
|
This pulls ~7MB, the current docs pulls about 9MB from cloudflare (who does some on the fly compression for us). I can't imagine starting with slightly smaller images to begin with wouldn't help (even if our net gain actual gain is less than you would expect). |
|
Deferred the question to sphinx-gallery. |
PR Summary
This PR brings a reduction of ~2x on the thumbnail size in the gallery, which improves significantly the loading time.
Same PR as scikit image: scikit-image/scikit-image#4613
Submitted after @tacaswell 's suggestion.
PR Checklist