Skip to content

fix(render): keep a canvas's GPU cache at 256 MB or more - #31

Merged
riteshshukla04 merged 1 commit into
mainfrom
fix/gpu-cache-floor
Nov 11, 2026
Merged

riteshshukla04 merged 1 commit into
mainfrom
fix/gpu-cache-floor

Conversation

@riteshshukla04

@riteshshukla04 riteshshukla04 commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Stacked on #30.

A canvas's GPU cache was capped at the image budget, 64 MB by default. It also holds every frame's path geometry; 10,000 paths need about 86 MB, so the geometry was evicted and rebuilt every frame, and tgfx fell below skia at that count.

The cache is now max(image budget, 256 MB). A larger image budget still raises it; resources unused for 120 frames are freed as before.

Samsung SM-E146B, 10,000 paths, two runs each:

before after
SurfaceView 8.8 fps, 167 % CPU 21.8 fps, 110 % CPU
TextureView 4.8 fps, 204 % CPU 20.4 fps, 115 % CPU

No other row moved beyond noise. Full before/after tables are in #32.

@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
react-native-tgfx Ready Ready Preview Nov 11, 2026 8:22am UTC

Request Review

A canvas's GPU cache was capped at the image budget, 64 MB by default. It
also holds every frame's path geometry, and 10,000 paths need about 86 MB,
so the geometry was evicted and rebuilt every frame. A larger image budget
still raises the cache; resources unused for 120 frames are freed as before.
@riteshshukla04
riteshshukla04 merged commit 3106534 into main Nov 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant