You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the biggest performance walls when using liboni with a GC-based language as C# is that we are creating and dereferencing a lot of small objects per second. This causes a big strain on the GC, which results in overall performance downgrade. Additionally, this might be related to the issue where, after several hours of normal operation, the GC call ratio decreases, causing a rapid growth of in-memory objects, quickly saturating the computer RAM. The actual causes of this issue are still unknown.
However, normal GC usage can still impact performance. The current implementation does not help, as it goes through several intermediate objects. From the C-level liboni frame, to its clroni wrapper, then a ONIManagedFrame on Bonsai.ONIX and then the final device frame injected into the reactive chain. Streamlining this process can help with GC calls.
Even so, frame production is still fast, it can reach several hundred KHz in some devices. So, as a tentative idea, maybe a pooled object approach might be desirable. Were it or not, GC usage and object lifetime is an important parameter to be aware of and take it into account while designing the new libraries.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
One of the biggest performance walls when using liboni with a GC-based language as C# is that we are creating and dereferencing a lot of small objects per second. This causes a big strain on the GC, which results in overall performance downgrade. Additionally, this might be related to the issue where, after several hours of normal operation, the GC call ratio decreases, causing a rapid growth of in-memory objects, quickly saturating the computer RAM. The actual causes of this issue are still unknown.
However, normal GC usage can still impact performance. The current implementation does not help, as it goes through several intermediate objects. From the C-level liboni frame, to its clroni wrapper, then a
ONIManagedFrame
on Bonsai.ONIX and then the final device frame injected into the reactive chain. Streamlining this process can help with GC calls.Even so, frame production is still fast, it can reach several hundred KHz in some devices. So, as a tentative idea, maybe a pooled object approach might be desirable. Were it or not, GC usage and object lifetime is an important parameter to be aware of and take it into account while designing the new libraries.
Beta Was this translation helpful? Give feedback.
All reactions