React: Question : is React Fiber using GPU ?

Created on 22 Jan 2018  路  2Comments  路  Source: facebook/react

Hi React Team !

Here in Clovis.pro (React 15.4) we want to enhance React performances on quite old phones and tablets. Sometimes multi-component updates could slow down the phone and make the UX uncomfy (that's normal, basic javascript uses the CPU and old hardware have low CPU).

To enhance React performances did you made and update in React Fiber to directly allow the javascript to be run by the GPU ? Or do you know libraries to make that global hack ? Thanks ! :wink:

ps : GPU is already used in CSS with Translate3D to make animations smoother.

Most helpful comment

I don't think it's possible to run JavaScript directly on the GPU. There exist JavaScript libraries which allow you to use the GPU to accelerate calculations, but nothing that lets you run JS on the GPU. Though React communicates with the DOM and not the GPU directly, that I believe is the browser's job.

If you're asking for adding the capability to run JS on the GPU then that is not an issue that has to do with React and doesn't really belong here.

All 2 comments

I don't think it's possible to run JavaScript directly on the GPU. There exist JavaScript libraries which allow you to use the GPU to accelerate calculations, but nothing that lets you run JS on the GPU. Though React communicates with the DOM and not the GPU directly, that I believe is the browser's job.

If you're asking for adding the capability to run JS on the GPU then that is not an issue that has to do with React and doesn't really belong here.

Yeah, we don't do anything like that. React 16 also runs in compatibility mode so don't expect drastic changes there. Keep an eye on our blog for announcement related to async React (which is still not related to GPUs though).

Was this page helpful?
0 / 5 - 0 ratings