Wave Engine Web shows great performance with .NET 6.0
Wave Engine, our pure .NET graphics engine designed for the industrial sector, has been able to run on web browsers for two years now, thanks to WebAssembly technology and the great work of Mono Wasm. Back in 2020, we couldn’t leverage the full potential of .NET 5 as it lacked important build features and optimizations for Wasm time-sensitive applications.
But recently, with Mono Wasm being integrated into .NET 6, it seemed a good time to revisit it. Although vanilla Wasm applications are not officially supported and the technology is not mature yet, we managed to create a layer on top of Blazor SDK that allowed us to build and run “pure” Wasm projects on .NET 6.0, with great performance improvements that we would like to share:
Wasm .NET 6.0: Faster Than Ever
The interpreter has been improved greatly in .NET 6, which gives the web assembly runs a nice performance bump “for free”. Our rendering tests show a 32% performance increase on average!
Improving Loading Times
Loading times on the web are crucial, especially in WebAssembly where binaries and assets can be quite big. We were able to develop a new packaging system that is able to load most files in parallel. We also took advantage of the Brotli compressing system already implemented in Blazor, to shrink each file as much as possible. The results are amazing, loading in parallel reaches a 2.3X loading time improvement on average!
What About AOT?
Although ahead-of-time compilation adds a penalty in file size, it is useful in web apps with heavy compute load as this type of compilation can double or even more the performance. However, AOT in .NET 6 Web Assembly is not mature enough, and we were only able to compile in AOT partially, getting a 47% boost in performance. We expect to be able to compile in “full AOT” by the end of the year, keep in touch!
All these tests have been performed on an I7 CPU with 16GB of RAM and an NVIDIA GeForce RTX 2060, using a custom WaveEngine WebGL benchmark with heavy CPU load and big textures.
*If you want to check out the new improvements thanks to .NET 6.0, don’t miss this demo of our Robot Arm.