Skip to content

[performance] Avoid cross-viewport GalleyCache eviction - #8418

Open
rustbasic wants to merge 5 commits into
emilk:mainfrom
rustbasic:p116
Open

[performance] Avoid cross-viewport GalleyCache eviction#8418
rustbasic wants to merge 5 commits into
emilk:mainfrom
rustbasic:p116

Conversation

@rustbasic

@rustbasic rustbasic commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

This changes Fonts to keep GalleyCache entries partitioned by viewport.

Previously, multiple viewports shared one galley cache. Since each viewport flushes the cache at the start of its pass, root and child viewports could repeatedly evict each other's text layouts.

As viewport text workload grows, this can force repeated layout of large text contents and cause significant performance degradation.

Font data and the texture atlas remain shared. Only layout caches are separated by an opaque viewport namespace.

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown

Preview available at https://egui-pr-preview.github.io/pr/8418-p116
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

View snapshot changes at kitdiff

@rustbasic rustbasic changed the title Avoid cross-viewport GalleyCache eviction [performance] Avoid cross-viewport GalleyCache eviction Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant