April 26, 2024
Multi-threaded React WebGL Applications
JavaScript, the only programming language executed natively by web browsers, is by design single-threaded. This means that all web applications run in a single thread. This is perfectly sufficient for all standard cases, but sometimes we encounter situations where huge expensive calculations are so time-consuming that the application stops responding to the user. Typical cases are applications computing complex 3D scenes. Luckily, OffscreenCanvas and Web Worker technologies are here to change it.