egui icon indicating copy to clipboard operation
egui copied to clipboard

Optimization opportunities (tracking issue)

Open emilk opened this issue 3 years ago • 1 comments

There is a lot of room for improvements to the CPU usage of egui. Here are some things worth investigating:

  • [x] Try different hash algorithms for Id, FontCache and others.
  • [x] Precompute vertices for circles and rounded corners in epaint::Tessellator constructor (https://github.com/emilk/egui/pull/1547)
  • [x] Paint small filled circles using textured rects (by adding a few low-radius circles to the font atlas) (https://github.com/emilk/egui/pull/1616)
  • [ ] Run egui with a proper profiler and see what pops up
    • Try https://github.com/mstange/perfrecord
  • https://github.com/emilk/egui/issues/1098
  • [ ] Optimize size of egui::Response (use bitfields?)
  • [ ] eframe/native: run App::update and the rendering in different threads
  • [ ] Output a single veretex buffer and index buffer instead of Vec<ClippedPrimitive>

Any PR should come with a benchmark.

emilk avatar Feb 02 '22 15:02 emilk

I added integration with the puffin profiler in https://github.com/emilk/egui/pull/1483 to make it easier to a get a rough overview of app performance.

emilk avatar Apr 13 '22 08:04 emilk

This could be updated to link to #3862 and #1485, which have PRs in progress.

YgorSouza avatar Feb 03 '24 10:02 YgorSouza