Skip to content

fix(css): scroll-hover transition accumulates raster tiles in Brain memory list #88

Description

@jdmanring

Summary

Scrolling the mouse over the Brain memory list while items enter and leave hover state causes continuous raster-tile accumulation. Around 1 GB of growth is reproducible from repeated up-down scroll passes.

Root causes

1. transition: all 0.15s on .memory-item (base class, line 10844)

The base class applies transition: all to every .memory-item. In the #memory-list scroll context, as the cursor moves over items during scroll each item cycles through enter-hover and leave-hover, animating background and border-color transitions. Both properties require main-thread painting (neither is compositor-promoted). At 60 fps with a 0.15 s transition that is 9 paint frames per enter/leave cycle, per item. Qt does not forward OS memory pressure to the embedded Chromium renderer; the raster tiles deposited by these transitions are never evicted.

2. will-change: transform on all #memory-list .memory-item::after (line 10885)

will-change: transform pre-promotes every ::after pseudo-element to a compositor layer, including items scrolled off-screen. A continuously running transform animation auto-promotes the layer without this hint, so the declaration is redundant for visible items and actively harmful for off-screen ones: it forces GPU backing texture allocation for every item in the DOM regardless of viewport position.

Fix

  1. Override transition: all 0.15s in the #memory-list .memory-item context with transition: opacity 0.15s — limits transitions to compositor-promoted properties only. No raster tiles from scroll-triggered hover changes.

  2. Remove will-change: transform from #memory-list .memory-item::after — the animation auto-promotes the layer when active; off-screen items do not need backing textures.

Classification

Upstream-candidate. Same root cause as the fix in PR draft at docs/fork/upstream/pr-drafts/fix-brain-panel-oom.md: Qt not forwarding OS memory pressure means raster tiles from main-thread paint operations accumulate indefinitely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions