# How can I optimize GPU usage to enhance performance

**URL:** <https://discourse.threejs.org/t/how-can-i-optimize-gpu-usage-to-enhance-performance/58972>\
**Category:** Questions\
**Tags:** react-three-fiber\
**Created:** [December 7, 2023, 9:25am UTC](https://discourse.threejs.org/t/how-can-i-optimize-gpu-usage-to-enhance-performance/58972 "2023-12-07T09:25:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Momin\_Muzammil](https://avatars.discourse-cdn.com/v4/letter/m/c77e96/32.png) [@Momin\_Muzammil](https://discourse.threejs.org/u/Momin_Muzammil)\
**Post date:** [December 7, 2023, 9:25am UTC](https://discourse.threejs.org/t/how-can-i-optimize-gpu-usage-to-enhance-performance/58972/1 "2023-12-07T09:25:39Z")

</div>

[Example code here](https://codesandbox.io/p/devbox/3d-mq5msh?filpage.tsx%3A4%2C24)-In this example, GPU usage is excessively high. I want to reduce it. I attempted to handle it, but I haven’t found a solution. Any suggestion for optimizing GPU usage?

---

<div class="post-metadata">

**Author:** ![mjurczyk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mjurczyk/32/10995_2.png) [@mjurczyk](https://discourse.threejs.org/u/mjurczyk)\
**Post date:** [December 7, 2023, 9:28am UTC](https://discourse.threejs.org/t/how-can-i-optimize-gpu-usage-to-enhance-performance/58972/2 "2023-12-07T09:28:01Z")

</div>

> [@Momin\_Muzammil](#):
>
> GPU usage is excessively high

How do you determine that? There seems to be no stats / measurement tools within the project that’d show the GPU usage.

---

<div class="post-metadata">

**Author:** ![Momin\_Muzammil](https://avatars.discourse-cdn.com/v4/letter/m/c77e96/32.png) [@Momin\_Muzammil](https://discourse.threejs.org/u/Momin_Muzammil)\
**Post date:** [December 7, 2023, 10:02am UTC](https://discourse.threejs.org/t/how-can-i-optimize-gpu-usage-to-enhance-performance/58972/3 "2023-12-07T10:02:14Z")

</div>

I have found out using the windows Task Manager that as soon as I open the [example code here](https://codesandbox.io/p/devbox/3d-mq5msh?file=%2Fapp%2Fpage.tsx%3A6%2C1) tab,GPU usage increases from 0 to over the 90%

 ![tm](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/2/a/2a8fd662bc412d3cc349bef2dffeae4c15ba7ace.png)

---

<div class="post-metadata">

**Author:** ![mjurczyk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mjurczyk/32/10995_2.png) [@mjurczyk](https://discourse.threejs.org/u/mjurczyk)\
**Post date:** [December 7, 2023, 11:35am UTC](https://discourse.threejs.org/t/how-can-i-optimize-gpu-usage-to-enhance-performance/58972/4 "2023-12-07T11:35:13Z")

</div>

How does your GPU react to opening any of the [official examples](https://threejs.org/examples/?q=perform#webgl_shadowmap_performance) ?

As for your code - everything looks ok, besides the fact that you put `<EffectComposer>` somewhere in the middle of the scene. It should be the first child of `<Canvas>` and it should wrap around all the other elements in the scene - similarly as canvas does.

---

<div class="post-metadata">

**Author:** ![Chaser\_Code](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/chaser_code/32/20199_2.png) [@Chaser\_Code](https://discourse.threejs.org/u/Chaser_Code)\
**Post date:** [December 7, 2023, 11:59am UTC](https://discourse.threejs.org/t/how-can-i-optimize-gpu-usage-to-enhance-performance/58972/5 "2023-12-07T11:59:03Z")

</div>

Maybe into browser hardware enabled, not gpu
