Replies: 1 comment
-
An appendix to my original post: At my pc it shows the following behaviour: With a sleep duration of 0, I get 120 fps with 5% CPU load. The CPU load decreases with increasing sleep durations. But until a sleep duration of around 7000 us no drop in the fps rate occurs. (I.e., at 0 us I get 120 fps using 5% CPU, at 7000us I still get 120 fps using around and less than 1% CPU.) Is there some component in the rendering path that waits in a running loop? (And is there any downside in using
|
Beta Was this translation helpful? Give feedback.
-
Hello!
(And sorry for double posting this from Discord, but I think it is pushed there already into oblivion.)
I'm writing a small app that currently shows only a table and wondered about the CPU load of this app. Going backwards, the CPU load doesn't seem to depend much on showing the table or showing basically an empty window, reaching around 5% load (what I think is about one core) by only moving the mouse over the window. The same if I replace the mouse movement by "ctx.request_repaint()".
I then noticed that when I run the egui demo app in the web version in Firefox in continuous mode a frame takes about 2 ms with some demo windows opened and it causes about 2.5% load on the CPU.
If I run the demo app locally (i.e. not in the browser, compiled with the command given in the git repo, on Windows) a frame takes 0.8ish ms, thus certainly faster as the web version. But the CPU shows about 5% load. (Both versions run with 120 fps.)
At my dev pc that all doesn't really matter, but on the targeted pc, which only has four cores, a simple gui ends up using 25% of the CPU.
At this point I have two questions:
Beta Was this translation helpful? Give feedback.
All reactions