posthog.com icon indicating copy to clipboard operation
posthog.com copied to clipboard

Various speed improvements

Open smallbrownbike opened this issue 1 month ago • 7 comments

Changes

  • Removes initial loader
  • Renders icons/background after the first window loads
  • Removes unused static queries (these show up on every page and slow down initial load times)
  • Moves static queries to page queries when possible (page queries only appear on the page they're used)
  • Lazy loads most desktop components
  • Uses CSS to show initial window instantly

smallbrownbike avatar Nov 05 '25 02:11 smallbrownbike

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
posthog Ready Ready Preview Dec 7, 2025 3:47pm

vercel[bot] avatar Nov 05 '25 02:11 vercel[bot]

This basically introduces CLS, which arguably isn't any better than the loading state.

Is there any way we can calculate where the window is most likely to appear (eg: a little bit of offset) instead of just rendering at the top, then calcing after the page finishes loading?

corywatilo avatar Nov 07 '25 01:11 corywatilo

Windows should always initially load in the correct place. Are you looking at the right deployment? Or maybe you have boring mode on?

https://github.com/user-attachments/assets/d2c0164f-e7ef-4080-bc9b-8bcb3d9598a8

smallbrownbike avatar Nov 07 '25 02:11 smallbrownbike

@smallbrownbike We good to merge this or did you want to make some more tweaks?

corywatilo avatar Nov 09 '25 03:11 corywatilo

@corywatilo just need to make a couple tweaks! will ping you when it's ready

smallbrownbike avatar Nov 09 '25 03:11 smallbrownbike

Thoughts?

corywatilo avatar Dec 07 '25 16:12 corywatilo

that's actually a good showcase of what this does - window loads immediately while everything loads behind it. if this were prod, your slow internet would just show the loading bar until the page eventually loads.

smallbrownbike avatar Dec 08 '25 21:12 smallbrownbike