The Performance Updates: Difference between revisions

From Resonite Wiki
Rewrite more
Links
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
The performance updates are a series of updates in response to [https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/706 Issue 706].
The main goal of the performance updates is to separate [[FrooxEngine]] from Unity so that FrooxEngine can benefit from a faster runtime in [https://learn.microsoft.com/en-us/dotnet/core/introduction .NET 9+]. In addition, this allows for easier switching to an alternate renderer in the future.


== The Issue ==
== The Issue ==
The main goal of the performance updates is to separate FrooxEngine from Unity so that FrooxEngine can benefit from a faster runtime in .NET 9+.
Prior to separation, if Unity crashes it takes down FrooxEngine with it. Another problem is that Unity uses a slower runtime called [https://docs.unity3d.com/6000.1/Documentation/Manual/scripting-backends-mono.html Mono] which reduces the performance of FrooxEngine considerably, as it runs FrooxEngine inside of a MonoBehavior (Unity component). FrooxEngine also slows down Unity to an extent as well [https://discord.com/channels/1040316820650991766/1154514007479287942/1382658903682060288 (comment from Frooxius)]
 
Prior to separation, if Unity crashes it takes down FrooxEngine with it. Another problem is that Unity uses a slower runtime called Mono which reduces the performance of FrooxEngine considerably, as it runs FrooxEngine in a MonoBehavior (Unity component).


== The Solution ==
== The Solution ==
Frooxius has devised a series of updates separated into different parts. Each stage brings more systems from Unity into FrooxEngine. These are pre-requisites for the separation.
Frooxius has devised a series of updates to address this. Each stage brings more systems from Unity into FrooxEngine, allowing more control over them and lowering the dependency on Unity. These are pre-requisites for the separation.


The major steps:
The major steps:
* [[PhotonDust]] (Particles update) [https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/587 Issue 587]
* [[PhotonDust]] (Particles update) [https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/587 Issue 587]
* [[Awwdio]] (Audio update) [https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/2430 Issue 2430]
* [[Awwdio]] (Audio update) [https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/2430 Issue 2430]
* Unity Connectors -> Inter Process Communication (Last stage and final release)
* Process-based architecture (Inter-process communication) [https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/706 Issue 706]


These updates change core components of the engine, and allow it to work entirely standalone without relying on Unity.
These updates change core components of the engine, and allow it to work more standalone.


The engines will be separated into different processes and communicate via a shared memory file.
The engines will be separated into different processes and communicate via a [https://learn.microsoft.com/en-us/dotnet/standard/io/memory-mapped-files shared memory file]. Unity will still handle parts of the input, however its main function will be for the rendering.


== Resources ==
== Resources ==
<youtube>https://www.youtube.com/watch?v=9cx2-VtL_LM</youtube>
<youtube>https://www.youtube.com/watch?v=9cx2-VtL_LM</youtube>

Latest revision as of 13:45, 12 June 2025

The main goal of the performance updates is to separate FrooxEngine from Unity so that FrooxEngine can benefit from a faster runtime in .NET 9+. In addition, this allows for easier switching to an alternate renderer in the future.

The Issue

Prior to separation, if Unity crashes it takes down FrooxEngine with it. Another problem is that Unity uses a slower runtime called Mono which reduces the performance of FrooxEngine considerably, as it runs FrooxEngine inside of a MonoBehavior (Unity component). FrooxEngine also slows down Unity to an extent as well (comment from Frooxius)

The Solution

Frooxius has devised a series of updates to address this. Each stage brings more systems from Unity into FrooxEngine, allowing more control over them and lowering the dependency on Unity. These are pre-requisites for the separation.

The major steps:

These updates change core components of the engine, and allow it to work more standalone.

The engines will be separated into different processes and communicate via a shared memory file. Unity will still handle parts of the input, however its main function will be for the rendering.

Resources