3 ms·
I love the visual effect, but I have to wonder how much CPU/GPU is entailed in rendering 10-50 triangles, blurring them and rendering the result to the page can
by rcarmo 9y ago
I love the visual effect, but I have to wonder how much CPU/GPU is entailed in rendering 10-50 triangles, blurring them and rendering the result to the page canvas vs. loading a pre-blurred image (that might be a "tiny" progressive JPEG), so I'd probably try to do this server-side first
(edit for clarity: my site currently generates <12Kb blurred placeholders from high-def photos and only loads visible images to be more mobile-friendly, and I worry about client-side rendering impacting battery life).
- pbhjpbhj 9y agoJPEG has a thumbnail facility built-in I think, did you try using a pre-created thumbnail scaled up? Or just progressive images?
- rcarmo 9y agoI generate blurred thumbnails from my photos, and then output progressive JPEGs at 80% quality (which is low enough for my purposes and provides a smooth output) Code is here: https://github.com/rcarmo/sushy/blob/master/sushy/utils.hy#L179 https://github.com/rcarmo/sushy/blob/master/sushy/utils.hy#L... The thumbnails you refer to are part of EXIF data, partially designed to allow digital cameras to render previews inside the camera itself in more resource-constrained times.