Patreon Blog Main Start

Mobile vs. Desktop Performance: WASM and WebGL

The Little Prince and a snail
Image: Antoine de Saint-Exupéry, drawings for The Little Prince

Performance bottlenecks

An overview of the differences between mobile and desktop performance. The same OCCT, WASM, and WebGL stack behaves very differently on mobile vs. desktop and not because of a single bottleneck, but because of all three layers: CPU, memory, and GPU.

Desktop offers high performance and larger caches, which are critical for meshing algorithms. Mobile, however, has weak performance, making meshing the primary bottleneck.

Regarding the WASM layer (Emscripten), desktop browsers (Chrome, Firefox, etc.) achieve near-native speeds (~70-90% of C++) and can handle hundreds of megabytes of memory efficiently. Mobile browsers show slower WASM execution (~40-70% of native C++) and much lower memory limits (~100-500 MB). The critical difference in how memory grows for large mesh data allocations can lead to failures.

While we handle most of the failures and errors, the huge data processing can lead to missing parts. In that case, the better option is to change the triangulation level.

The bottleneck chain on mobile is: OCCT meshing - WASM memory - WebGL draw. All of these components require aggressive reduction to ensure good performance in a mobile browser.