Skip to content
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

Update to latest egui #7418

Merged
merged 8 commits into from
Sep 16, 2024
Merged

Update to latest egui #7418

merged 8 commits into from
Sep 16, 2024

Conversation

emilk
Copy link
Member

@emilk emilk commented Sep 13, 2024

What

Uses the latest egui containing this gem:

So far request_discard (running a second pass) is only used in these situations:

  • For when a Grid first shows up
  • When an egui_table first shows up
  • When asked to auto-size an egui_table row

Of course, running a second pass has some costs. Luckily, we already execute our most expensive stuff (the viewport) last, and so we can easily early-out from things like point cloud upload/rendering, as shown in this puffin-capture of a frame with two passes in it:

image

NOTE: this flamegraph is of a DEBUG build - the point is not the relative times, but that pass 0 becomes very cheap, if the request_discard is called from one of the non-viewport panels (e.g. the selection panel).

There might still be cases where we do expensive stuff twice, e.g. if something calls request_discard in a space view tooltip.

If we come to regret this, we can disable all second passes by setting egui::Options::max_passes to 1.

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!
  • If have noted any breaking changes to the log API in CHANGELOG.md and the migration guide

To run all checks from main, comment on the PR with @rerun-bot full-check.

@emilk emilk force-pushed the emilk/update-egui-multipass branch from d05f504 to 7eac463 Compare September 13, 2024 12:39
@emilk emilk added 📺 re_viewer affects re_viewer itself dependencies concerning crates, pip packages etc exclude from changelog PRs with this won't show up in CHANGELOG.md egui Requires egui/eframe work labels Sep 13, 2024
@emilk emilk marked this pull request as ready for review September 13, 2024 14:55
@Wumpf Wumpf self-requested a review September 16, 2024 13:13
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds promising!

@Wumpf Wumpf merged commit c9e4319 into main Sep 16, 2024
33 of 34 checks passed
@Wumpf Wumpf deleted the emilk/update-egui-multipass branch September 16, 2024 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies concerning crates, pip packages etc egui Requires egui/eframe work exclude from changelog PRs with this won't show up in CHANGELOG.md 📺 re_viewer affects re_viewer itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants