Very high cpu and gpu consumption for simple scene

I have very simple scene with react three fiber (react three cannon for physics). it has two draw calls and using mesh basic maetrial but when I open my task manager it shows really high consumption on both cpu and gpu. I suspect cpu consumption due to cannon since it must be doing calculation cpu but it really confusing to see gpu consumption for such a simple scene.

this is demo of my scene and this is whole code (sandbox is not rendering anything, idk why but deployed works and works locally too)

Please help!

1 Like

That’s weird, all the devices I have checked this demo on, showed me high consumption. Now it’s really confusing to me. Also thanks for checking :slight_smile:

Forgot to ask, what are the specs of your laptop/desktop?

8gb ram, 4gb video, 4 core 3000Hz

1 Like

Runs fine for me:

Intel Core i7 8700K
32gb RAM
NVidia RTX2080ti (11gb)

Looking at the chrome task manager, your tab does consume quite some CPU resources (sometimes / it spikes) when the tab is visible though.

1 Like

Yeah, I am not sure why it consuming so much cpu memory. Even physics calculation shouldn’t take that much of memory and it’s seems really arbitrary cause it’s shows different stats in different devices which is making it even hard to pin point the problem.
Also thanks for checking.

Do you have any idea what could be the problem?

you can see in dev tools what consumes what. it’s usually the best to just profile it. go to the performance tab and record a few seconds, then look cause what’s causing it.

locally i see nothing, it’s tame, no cpu tasks that cause any amount of stress, just three’s render loop chugging along with some onworker messages.

btw there’s also p2 (3d physics), which might be faster since it has a lot less to calculate. it works almost in the same way, you just exchange a few hooks.

webgl imo is hit and miss on some machines. my last two macbooks just couldn’t run anything without heat and throttling. the one i have now runs webgl without problems.

oh okay. both cpu and gpu consumption drops by great amount when the canvas size is really small. I wonder if I can use that if I know that it doing too much of consumption?

both cpu and gpu consumption drops by great amount when the canvas size is really small

That almost sounds like your canvas isn’t hardware accelerated :thinking:

What specs does your machine have?