Skip to content

Make WidgetText smaller and faster #6903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 6, 2025
Merged

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
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