-
-
Notifications
You must be signed in to change notification settings - Fork 405
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
[Renderers/Raylib] CPU load is high #293
Comments
For me, raylib is rendering as fast as it possibly can. Perhaps try limiting the fps. add a |
with compare the browser cpu load without action, still much higher. |
@calvin2021y Browsers by default won't re render if there is no user input - try watching the CPU usage when you're wiggling your mouse cursor over a page 🙂 Raylib has an equivalent setting you can enable that emulates this behaviour, with You can see that it's commented out in the example raylib renderer here: https://github.com/nicbarker/clay/blob/main/renderers/raylib/clay_renderer_raylib.c#L122 |
#298 May help a little. |
thanks a lot for the tips. after apply #298 and enable EnableEventWaiting(), build with lto. the cpu load is 5% ~ 20%. in background less than 1%. |
try build
raylib-sidebar-scrolling-container
,raylib-multi-context
, andSDL3-simple-demo
on macOS, the CPU load is around 10% to 70%.raylib-sidebar-scrolling-container logs:
compare to Microsoft Edge or chrome, to load
https://github.com/nicbarker/clay
cpu load max around 40%. (browser on background cpu load is about 4%)I just build them by:
Is this expected or I do something wrong?
The text was updated successfully, but these errors were encountered: