egui icon indicating copy to clipboard operation
egui copied to clipboard

Frame delay, input lag, frame lag

Open enomado opened this issue 3 years ago • 4 comments

I captured bt OBS and slow down 25x to see separate frames.

You can see difference versus my old canvas code(right) rewritten to egui(left). As for me, there is 1~2 frames lag.

https://user-images.githubusercontent.com/707007/184391715-83ce39a4-9221-402b-aa32-f669eb2e48db.mp4

https://user-images.githubusercontent.com/707007/184388016-60cbc0fb-c8e4-4307-89da-b67c8fc4225c.mp4

commands i used:

ffmpeg -i 2.avi -bsf:v setts="TS*30" -c copy 2_30x.avi ffmpeg -i output_25x.mp4 -vcodec libx264 -crf 28 output_25x_transcoded.mp4

enomado avatar Aug 12 '22 16:08 enomado

There is one thing I find: event loop prioritize re-render event than input event. It look better, but I still lack of way to reproduce properly. may be later :)

enomado avatar Aug 16 '22 13:08 enomado

Thanks for looking in to this, but I lack a few details: is this on web or native? What platform?

emilk avatar Aug 20 '22 10:08 emilk

Web and "default" native. And "may be" bevy integration looks faster.

Its actually still too "subjective". perhaps I need proper test, with fps displaying e.g. Can we capture mouse events by unfocused window ? to lets say display few windows in row.

Sorry if its minor task. I just noticed something and may be someone want to dive deeper in future.

enomado avatar Aug 20 '22 20:08 enomado

There is one thing I find: event loop prioritize re-render event than input event. It look better, but I still lack of way to reproduce properly. may be later :)

i have ever create proxy to send empty event to observe re-render event,and my window draw two pictures quickly in turn,when i move main windows quickly, i can see picture showing lag sometimes and re-render event lost,so i think re-render has no high priority and egui is not suitable for video showing? but i observe 58 fps using egui-miniquad,maybe miniquad use different event loop?

skydig avatar Sep 08 '22 09:09 skydig