Compile Robust.Client.WebView with NativeAOT #5586
Labels
Area: WebView
Difficulty: 3-Hard
Extensive codebase knowledge required.
Issue: Performance
Things are slow.
CEF needs to spawn a bunch of subprocesses. Those subprocesses are spawned from
Robust.Client.WebView
, which is a C#/.NET program just like the rest of the game. This means all those subprocesses have their own .NET runtime with JIT and GC, despite most of them running nigh-zero C# code. I wager this adds up to about ~120 MB of memory at a bare minimum. Quite wasteful.Also, this caused WebView to break when we moved the launcher to .NET 9, because
Robust.Client.WebView
can't be started anymore because the executable targeted the older .NET runtime.Moving
Robust.Client.WebView
to be compiled with NativeAOT would solve both issues. Well, we'd still have a nasty GC heap per process, but that's not the end of the world.This would make the build process more annoying though, since it has to be compiled on the target OS. Oh well.
The text was updated successfully, but these errors were encountered: