Closed zachmprince closed 4 days ago
Approved from my end! Not sure this can be tested, so I'll let John S comment on that.
Coming up with the test for this is not trivial to me. I'm not even sure what would be tested. Plus, the effectiveness of the change is largely dependent on the plugins and what interfaces are active.
Could you add this and the previous PR to the release notes? I think they are pretty important-to-mention updates!
Added an item to the release notes. I wasn't sure whether to put it at the top or bottom of the list lol.
What is the change?
This change is a follow on to #1729 after it was observed that the garbage collector was not clearing
Reactor
data from a state distribution on worker processors after a reset. This is due to objects retaining references to the distributedReactor
. Upon investigation, these references came from a cyclic reference betweenCore
,Reactor
, andspatialGrid
objects, shown by this diagram created byobjgraph
:The solution was quite simple: setting
spatialGrid.armiObject
attribute toNone
, as well as theparent
attribute in theReactor
children.Why is the change being made?
Retaining the distributed state of the
Reactor
on workers is unnecessary memory overhead for interactions that don't require a distributed state.Checklist
doc
folder.pyproject.toml
.