Skip to content

Conversation

lucasmerlin
Copy link
Collaborator

@lucasmerlin lucasmerlin commented Apr 30, 2025

Copy link

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

@lucasmerlin lucasmerlin marked this pull request as draft April 30, 2025 10:16
@lucasmerlin lucasmerlin force-pushed the lucas/widget-text-optimization branch from 3766a30 to a1941b5 Compare April 30, 2025 10:17
@emilk emilk added performance Lower CPU/GPU usage (optimize) egui labels May 6, 2025
@emilk emilk changed the title Make WidgetText much smaller Make WidgetText much smaller May 6, 2025
@emilk emilk marked this pull request as ready for review May 6, 2025 09:32
@emilk
Copy link
Owner

emilk commented May 6, 2025

Some improvements, some regressions - but most importantly, the common cases has improved:

image

So, when adding italics we need another allocation now (because of Arc)

@emilk
Copy link
Owner

emilk commented May 6, 2025

Latest numbers:
image

@emilk emilk changed the title Make WidgetText much smaller Make WidgetText smaller and faster May 6, 2025
@emilk emilk merged commit 71e0b08 into master May 6, 2025
46 of 47 checks passed
@emilk emilk deleted the lucas/widget-text-optimization branch May 6, 2025 15:35
darkwater pushed a commit to darkwater/egui that referenced this pull request Aug 24, 2025
* In preparation of emilk#5830, this should reduce the performance impact of
that PR

---------

Co-authored-by: Emil Ernerfeldt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

egui performance Lower CPU/GPU usage (optimize)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants