Autopsy #09: 60 FPS on MacBook Pro, 11 FPS on Mid-Range Android
A card grid scrolls at 60 FPS on MacBook Pro but stutters at 11 FPS and OOM-kills the browser tab on mid-range Android.
The Incident & The False Culprit
A routine storefront redesign added multi-stop box-shadow elevation and a parallax hero banner to an 80-card catalog grid. It held 60 FPS on M3 MacBook Pros during design review.
- T+00:00Deployed the catalog update to 100% of mobile web traffic.
- T+04:00Android RUM telemetry flagged scroll frame rates collapsing to 11 FPS on Moto G and Pixel 6a devices, with main-thread frame times exceeding 88 ms.
- T+11:00Mobile GPU process memory climbed past 380 MB on initial page load.
- T+18:00Chrome crash reporting recorded a 14% tab OOM-kill rate (`RESULT_CODE_HUNG`) within 30 seconds of catalog scroll.
The Red Herring — Why the First Reflex Failed
In #perf-triage, the team assumed Blink was software-rasterizing cards because they lacked GPU acceleration. An engineer shipped will-change: transform; transform: translateZ(0); on .product-card to force hardware compositing.
It looked smooth on a 16 GB desktop GPU. On mid-range Android, promoting all 80 cards upfront allocated 80 persistent backing textures in VRAM, dropping scroll FPS further and doubling tab OOM kills.
Causal Chain Traversed
Step-by-step propagation across atomic concepts. Hover or click any step to inspect the underlying mechanism.
- 01Rendering PipelinePaint & Rasterization
Shadow and border-radius invalidations force CPU software rasterization across hundreds of card tiles per scroll frame.
- 02Rendering PipelineGPU Compositor Layers and will-change
Blanket will-change: transform promotes 80 cards into permanent GPU textures, exhausting mobile tile memory.
- 03Rendering PipelineCSS Containment
Without layout and paint containment, expanding one card badge invalidates the entire document tree.
- 04Rendering Pipelinecontent-visibility & Skipping Offscreen Work
Offscreen cards remain in the active style, layout, and paint pipeline despite sitting 4,000px below the fold.
- 05Rendering PipelineScroll-Driven Animations
A main-thread scroll listener mutates inline styles per frame instead of running compositor-bound scroll timelines.
Desktop unified memory hides unbounded layer promotion and full-tree invalidations. On constrained mobile GPUs, software rasterization pressure, blanket layer promotion, missing CSS containment, eager offscreen rendering, and main-thread scroll listeners compound into VRAM exhaustion.
Failure Reproduction Lab
Adjust the card count and toggle static will-change: transform in the simulator below to observe how GPU layer allocation scales into mobile VRAM exhaustion.
Mobile Card Grid: Layer Promotion vs VRAM Budget
Simulate how blanket will-change: transform on a 60-card feed exhausts mid-range Android GPU memory compared to CSS containment and content-visibility.
Layer-by-Layer Dissection
Rasterization Pressure Triggers Blanket Layer Promotion
Multi-stop box-shadow and backdrop-filter rules increase Paint & Rasterization cost on every scroll frame. Applying will-change: transform to every card forces GPU Compositor Layers and will-change promotion for all 80 items, locking 160+ MB of mobile VRAM at 3x DPR.
Missing Containment Amplifies Invalidations
Because each card lacked CSS Containment (contain: layout style paint), a dynamic stock badge update or image decode inside one card invalidated sibling and ancestor layout boxes across the entire feed.
Offscreen Cards Burn Memory and Layout Budget
With 80 cards in the DOM, 72 sit outside the viewport at any moment. Without content-visibility & Skipping Offscreen Work (content-visibility: auto plus contain-intrinsic-size), Blink styles, lays out, and allocates raster tiles for cards 4,000 pixels below the fold.
Main-Thread Scroll Listeners Block the Compositor
A scroll event listener read window.scrollY and wrote element.style.transform on every frame, forcing synchronous style recalculation. Replacing that handler with CSS Scroll-Driven Animations (animation-timeline: scroll()) moves the parallax calculation off the main thread onto the compositor.
Architectural Fix & Invariants
/* product-grid.css */
.product-card {
contain: layout style paint;
content-visibility: auto;
contain-intrinsic-size: auto 340px;
}
.product-card:hover {
will-change: transform;
}
.hero-parallax {
animation: parallax-shift linear both;
animation-timeline: scroll(root block);
}Architectural Invariants
- Zero static
will-changeon list items: Layer promotion is restricted to active hover or transition windows; lists never hold more than 12 persistent GPU textures. - Skip offscreen work by default: Feeds exceeding 20 cards apply
content-visibility: autowith an explicitcontain-intrinsic-sizeto bound initial layout and raster memory. - Compositor-only scroll effects: Scroll-linked transforms use
animation-timeline: scroll()orview(), neverwindow.addEventListener('scroll')mutating inline styles.
Golden Rule: GPU layers are finite VRAM allocations, not free speed flags; isolate layout with containment, skip offscreen cards, and promote layers only while they animate.
Primary Sources
Last verified: 2026-11-16