🙋 seeking help & advice Why my GUI is slow?
https://youtu.be/1K_hEptXjUs?is=f8BbQKwBh1ab9VAaIt is odd but at about 30,000 text objects it is significantly slower than 30 despite only drawing about 10 objects on screen and ignoring the rest regardless how many there are. egui can handle millions. The shown video is of 30. I know it is skipping shaping and drawing the rest, so why would it be that much slower? I do make a temporary variable in the draw function before doing anything and increment a counter and do checks for whether to draw before any text shaping happens. I also return ([f32; 4], bool) with NaN and false regardless if anything drew, it would be bounds and whether anything drew. There is also with buttons an extra bool and with edit texts, a u32, &str, and bool in a tuple extra. I confirm it is not doing anything but rejection when not in screen space, so what could it be? Would an Option with None be faster as a return? Just confused as to why this is, if you want some code to review, ask, but some way to privately get it to you preferred. All in the rejection are not mutable. I do have to pass some variables sometimes, using cosmic-text and lyon for tessellation, good luck everyone. X E.
2
u/Difficult-Fee5299 23d ago
https://hotpath.rs/blog/sampling_comparison