Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile Robust.Client.WebView with NativeAOT #5586

Open
PJB3005 opened this issue Jan 4, 2025 · 0 comments
Open

Compile Robust.Client.WebView with NativeAOT #5586

PJB3005 opened this issue Jan 4, 2025 · 0 comments
Labels
Area: WebView Difficulty: 3-Hard Extensive codebase knowledge required. Issue: Performance Things are slow.

Comments

@PJB3005
Copy link
Member

PJB3005 commented Jan 4, 2025

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.

@PJB3005 PJB3005 added Issue: Performance Things are slow. Difficulty: 3-Hard Extensive codebase knowledge required. Area: WebView labels Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: WebView Difficulty: 3-Hard Extensive codebase knowledge required. Issue: Performance Things are slow.
Projects
None yet
Development

No branches or pull requests

1 participant