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

Full CPU/GPU usage even when paused (brawllib_rs) #24

Open
jagoly opened this issue Dec 29, 2021 · 1 comment
Open

Full CPU/GPU usage even when paused (brawllib_rs) #24

jagoly opened this issue Dec 29, 2021 · 1 comment

Comments

@jagoly
Copy link

jagoly commented Dec 29, 2021

Right now, rukaidata will always re-draw the viewport, even if the animation is paused, and the camera and options have not changed. This means that cpu and gpu utilisation is very high whenever a subaction is open.

For me, using a laptop, this is pretty annoying since I have to always remember to switch to a different tab before alt-tabbing away from firefox. Often I forget and am only reminded when my legs start to get warm :(

I believe that it should be not too hard to change it so that the viewport only gets rendered when something has changed. I had a quick look into trying to do this myself, but for now at least it's beyond my extremely basic rust knowledge.

Thanks again for the tool!

@rukai
Copy link
Owner

rukai commented Jan 2, 2022

Thanks for the report.

The rukaidata javascript renderer will be replaced by the brawllib renderer running over wasm soon. It's already accessible behind the --wasm flag,

So no point fixing the issue in the javascript renderer but the wasm renderer probably has the same issue.
The solution would be to only redraw when a https://docs.rs/winit/0.25.0/winit/event/enum.Event.html#variant.RedrawRequested is received

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

2 participants