Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  OBI Performance degradation over time
#4
(10-01-2024, 09:45 AM)michendo Wrote: But there is something you had not addressed:  the massive effect that destroying the OBI Solvr and Actor is having on performance, the next time I load the scene, leading me to think I should not be destroying the solver, perhaps it is persisting in memory, even after the scene is reloaded. Is that the case? 

Hi,

Destroying a solver may release a large amount of memory, which is bound to have an impact on performance. Conversely, creating a solver may allocate quite some memory, depending on how many actors are being managed by that solver - and how complex they are. Adding new actors to a solver is also relatively heavy, as it may trigger an internal resizing of the solver resources (basically, lists of particles & constraints) and it also requires copying a considerable amount of data. See:
http://obi.virtualmethodstudio.com/manua...cture.html

(10-01-2024, 09:45 AM)michendo Wrote: but then the number of calls immediately goes to 30+ on the next scene when the OBI object returns

This of course can trigger multiple FixedUpdate calls / death spiralling, like any other performance intensive action. Creating a new solver and adding a new large actor to it requires allocating quite some memory, as well as copying a lot of blueprint data. Like usual in Unity, you must avoid creating/destroying large objects at runtime and use pooling instead.
Reply


Messages In This Thread
RE: OBI Performance degradation over time - by josemendez - 10-01-2024, 09:58 AM