Hacker News new | ask | show | jobs
by jitl 1702 days ago
(I work at Notion)

It looks like most of the guidance on Pagespeed for large images, and layout shift due to images. The guidance to fix is to set fixed images sizes for these elements, and to re-encode images into more efficient image formats, at their displayed size instead of their maximum source size. Potion probably doesn't currently know the correct width for an image because they give their users kind of unlimited style control to choose the image's size and layout, so they request the image at maximum size to make sure it's as sharp as possible. The images are still coming straight from Notion.so, and aren't served, transformed, or cached by Potion.

The rest of the page is fast - it's static HTML pre-generated or incrementally generated using Next.js, with a bit of JS on top, which is faster than Notion's fully dynamic thick client Javascript app. The example sites look good!

On the subject of Pagespeed's image guidance, Notion gets one out of two correct - when viewing these images from a Notion doc, we request & serve images at their displayed size using a query parameter, but we don't currently transcode the image to a more efficient format based on the browser's image support.

2 comments

Where does adding the ability for Notion to transcode images sit in y'all's backlog? As much as it's not Notion's fault here and an underlying issue of image (re)sizing, it still gives the impression that Notion is slow.
Sorry, but as a rule I try not to make forward looking statements about our plans. We are hiring, though! https://notion.so/jobs
Thanks for this! Really interesting.