Deferred spaces (stx 0.2.166) took the page from 233KB to 167KB and the SSR render from 166ms to 129ms at fourteen profiles. A deferred panel is 73% smaller than a full one — 2.4KB against 8.8KB.
It came in short of the ~70ms estimate, and the earlier measurement had already
said why. Stripping every row from all fourteen spaces saved only 25ms, so the
~9.5ms per space is the panel shell, not its contents. Deferral removes what
it can; the remaining 2.4KB is the <section>, the scroll container and the
title.
Getting further means not emitting the shells at all, which the track geometry
currently needs: SidebarSpaces sizes the track as panelCount * 100% and
translates by activeIndex * (100 / panelCount), so every panel has to exist for
the swipe to land in the right place.
Options, none obviously right yet:
- Give the track explicit widths per panel so absent ones do not break the maths.
- Render one placeholder
<section>per absent space with no children at all (drops the scroll container and title — but the title is what identifies a space mid-swipe, so this trades away real UX). - Accept 129ms and spend the effort on #5 instead, where the larger number is.
Worth measuring before building: at 3–5 profiles, which is a more realistic number than the 14 this repository accumulated during development, the whole render is ~77ms and this is not the bottleneck.