Skip to content
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

performance #4

Open
leeoniya opened this issue Mar 25, 2023 · 4 comments
Open

performance #4

leeoniya opened this issue Mar 25, 2023 · 4 comments

Comments

@leeoniya
Copy link

leeoniya commented Mar 25, 2023

cool project :)

there are certainly much faster frameworks than React these days (though most will require a JS/browser env).

https://krausest.github.io/js-framework-benchmark/current.html

i'm not sure about the advertised performance claims here, however.

ImGUI in the browser suffers from the same idle perf issues, see this ImPlot demo: epezent/implot#183 (comment)

i think there's a way to mitigate this somewhat by suspending the render loop or something, but dunno how this works out in real life.

image

image

@tchayen
Copy link
Owner

tchayen commented Mar 25, 2023

I haven't done any proper CPU/GPU profiling yet and haven't constructed benchmark-worthy tests, so so far it's just a bunch of hand-waiving and wishful thinking on my side 😃.

I will adjust the docs to add a big note explaining that the library hasn't been battle tested yet.

Regarding CPU usage – I will have to dig much deeper into that at some point.

I am not sure what is the 'Reduce FPS when app is idle' in the comment you linked. Most browsers automatically pause requestAnimationFrame() when tab is inactive: StackOverflow answer.

If you have some resources about JS profiling, performance, CPU/GPU usage topics – I would be very grateful for any links!

@leeoniya
Copy link
Author

leeoniya commented Mar 25, 2023

https://renderdoc.org/ is the gold standard AFAIK but hard to get working for WebGL. Spector.js seems like next best thing: https://github.com/BabylonJS/Spector.js/

https://twitter.com/gordonnl/status/1208127522044596225

https://twitter.com/bitnenfer/status/886003748371353600?lang=en

https://old.reddit.com/r/webgl/comments/xo7wwu/profiling_tools_for_webgl/

@tchayen
Copy link
Owner

tchayen commented Mar 25, 2023

Thanks so much! This is incredibly useful.

@DoctorGester
Copy link

@tchayen there is still value in stopping the render loop when the tab is open. My imgui/canvas apps all have the same problem of eating a bunch of battery and overheating phones when looked at for too long. And you don't really need to re-render most of the time, only when interactions or animations happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants