perf(media-requests): apply the off-screen fix to the request list — NOT YET MEASURED
Second instance of the pattern fixed in mediaReleases. The overdraw tool, corrected to
find row containers by child count rather than by uniform height, found only one other
widget genuinely rendering more than its tile can show:
nodes rows vis offscr imgs tile content kind
2951 80 7 2693 80 539 7206 mediaReleases (already fixed)
393 20 6 275 60 405 1512 mediaRequests-requestList
1,512 px of cards in a 405 px tile, and 20 cards carrying 60 images between them - each
card renders a full-tile backdrop plus a poster. Same treatment: content-visibility with
contain-intrinsic-size on the card, loading="lazy" on both images.
IMPORTANT: this is typechecked but **not measured**. Every other performance claim in this
branch was verified by an A/B before being committed; this one was not, because the session
ended first. It is committed so the work is not lost, and it is the first thing to verify
next - the same measurement used for mediaReleases applies:
STRESS_BASE_URL=http://127.0.0.1:PORT node --experimental-strip-types \
scripts/benchmarks/measure-board-paint.mts
Expect image requests to fall; do not expect JS heap to move, since decoded bitmaps live
outside JSHeapUsedSize.
Every other widget on the board fits its tile and needs nothing. The tool's "visible"
column misreads chart widgets (beszelSystemStats reports 28 rows / 0 visible because its
container is an SVG whose groups have no layout height) - content height versus tile height
is the trustworthy signal, and by that measure only these two overdraw.
This commit is contained in:
2 files changed
+50
-37
No files matched your search
@@ -104,10 +104,20 @@ const MediaRequestCard = ({ request, isTiny, options }: MediaRequestCardProps) =
|
||||
className={`mediaRequests-list-item-wrapper mediaRequests-list-item-${request.type} mediaRequests-list-item-${request.status}`}
|
||||
radius={board.itemRadius}
|
||||
p="xs"
|
||||
style={{
|
||||
// This list maps over every request, so its content is taller than the tile: measured at
|
||||
// 1,512 px of cards in a 405 px tile, with 20 cards rendering 60 images between them. The
|
||||
// off-screen ones still cost a backdrop and a poster fetch and decode each, and decoded
|
||||
// bitmaps are far larger in memory than their files. Skipping layout, paint and raster for
|
||||
// them leaves the DOM untouched, so scrolling and in-page search behave as before.
|
||||
contentVisibility: "auto",
|
||||
containIntrinsicSize: "auto 64px",
|
||||
}}
|
||||
>
|
||||
<Image
|
||||
className="mediaRequests-list-item-background"
|
||||
src={request.backdropImageUrl}
|
||||
loading="lazy"
|
||||
pos="absolute"
|
||||
w="100%"
|
||||
h="100%"
|
||||
@@ -130,6 +140,7 @@ const MediaRequestCard = ({ request, isTiny, options }: MediaRequestCardProps) =
|
||||
<Image
|
||||
className="mediaRequests-list-item-poster"
|
||||
src={request.posterImagePath}
|
||||
loading="lazy"
|
||||
h={40}
|
||||
w="auto"
|
||||
radius={"md"}
|
||||
|
||||
Reference in new issue
Block a user