React-compiler: Compiling React Applications to Improve Performance

Studenteropgave: Speciale (inkl. HD afgangsprojekt)

  • Niclas Jon Sommer
  • Kristoffer Magill Nash
4. semester, Software, Kandidat (Kandidatuddannelse)
In this project, we design and imple- ment React-compiler, a compiler written in JavaScript for compiling applications writ- ten in React, a front-end framework for the web, to more performant JavaScript code. The compiled applications outperform Re- act by up to 28% - 1740% in 5 out of 10 benchmarks in the Krausest benchmarking tool. In the worst performing benchmark we are 40% worse than React. The total file size of the application is reduced by up to 87% when compiled in our benchmarks. These results are achieved, in part by, re- moving the React runtime, and minimis- ing DOM operations by computing depen- dencies of JSX elements at compile time. React-compiler does have some limitations in terms of which React features it is capa- ble of compiling such as React hooks, por- tals, context. It also does not support third party libraries without modification to the library itself.
SprogEngelsk
Udgivelsesdato12 jun. 2020
Antal sider127
ID: 334089305