# Testing with Playwright - optimize CPU load

**URL:** <https://forum.babylonjs.com/t/testing-with-playwright-optimize-cpu-load/61398>\
**Category:** Questions\
**Created:** [November 12, 2025, 11:54am UTC](https://forum.babylonjs.com/t/testing-with-playwright-optimize-cpu-load/61398 "2025-11-12T11:54:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pcace](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@pcace](https://forum.babylonjs.com/u/pcace)\
**Post date:** [November 12, 2025, 11:54am UTC](https://forum.babylonjs.com/t/testing-with-playwright-optimize-cpu-load/61398/1 "2025-11-12T11:54:04Z")

</div>

Hi there,

i am currently working on a Project which uses Babylonjs + React. In order to make e2e tests work, i want to use Playwright. The issue i am having is, that all works great as long as i run my tests on a GPU accerlerated machine. Once i run the tests on a CPU only machine (like for example a github action runner) everything gets so slow that most of the tests fail because of timeout problems, while the CPU load is extremely high.  
Since i need babylon for some calculations which are then reflected in react components, i am not able to simple disable babylon completely.  
I am now wondering if it would be possible to minimize the load on the cpu as much as possible to try to still use the playwright tests (to test the react-components which depend on babylon) but only render a minmal bablon scene.  
I had the idea to only render the scene in a 1x1px canvas, but without any significant savings on cpu load by something like this:  
`limitDeviceRatio: isPlaywrightTest ? 0.001 : 1, // map.getPixelRatio(),`

or this:

`canvas.style.width = '1px' `  
`canvas.style.height = '1px' `  
`canvas.width = 1 `  
`canvas.height = 1`

i know it might be not so easy to answer given my small amount of information here, but maybe someone has another idea how i would drastically reduce the cpu load when running babylonjs in an only cpu environment?

Thanks a lot for ideas!

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [November 12, 2025, 4:33pm UTC](https://forum.babylonjs.com/t/testing-with-playwright-optimize-cpu-load/61398/2 "2025-11-12T16:33:30Z")

</div>

cc @docEdub

---

<div class="post-metadata">

**Author:** ![docEdub](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/docedub/32/14525_2.png) [@docEdub](https://forum.babylonjs.com/u/docEdub)\
**Post date:** [November 13, 2025, 3:05pm UTC](https://forum.babylonjs.com/t/testing-with-playwright-optimize-cpu-load/61398/3 "2025-11-13T15:05:10Z")

</div>

We use browserstack for the playwright tests on the CI.

> **[Most Reliable App & Cross Browser Testing Platform](https://www.browserstack.com/)**
>
> Instant access to 3000+ browsers and real iOS and Android devices for cross browser testing. Ship apps and websites that work for everyone, every time. Get Free Trial.

---

<div class="post-metadata">

**Author:** ![pcace](https://avatars.discourse-cdn.com/v4/letter/p/b782af/32.png) [@pcace](https://forum.babylonjs.com/u/pcace)\
**Post date:** [November 13, 2025, 4:00pm UTC](https://forum.babylonjs.com/t/testing-with-playwright-optimize-cpu-load/61398/4 "2025-11-13T16:00:35Z")

</div>

I was looking at that too, but could not figure out if that comes with gpu support or not.  
Does it?

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![docEdub](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/docedub/32/14525_2.png) [@docEdub](https://forum.babylonjs.com/u/docEdub)\
**Post date:** [November 13, 2025, 5:39pm UTC](https://forum.babylonjs.com/t/testing-with-playwright-optimize-cpu-load/61398/5 "2025-11-13T17:39:03Z")

</div>

Ya, it has GPU support
