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
Currently the propagation tracks all the changed variables and when it completes a propagation cycle, it will queue up all the propagators that are affected by the vars changed in the previous cycle. It repeats until no more variables change.
While this is super efficient on the one hand it does mean having highly volatile objects during a search. Temporary queue objects are created and destroyed by the millions which is very heavy on on the GC. We probably want to take a look at some standard techniques in an attempt to mitigate that. Recycle a queue, or use two and swap them after every cycle, etc.
temporary objects should be very cheap these days thanks to JIT (but don't appear to and is engine dependent)
the array only contains numbers (indexes) so we could use one of [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays](the fixed size arrays) like Uint16Array. Together with a fixed length, the upper bound being the total number of variables, this could prevent a lot of GC related overhead
it may not matter at all, the slowness could be originating from a different artifact.
The text was updated successfully, but these errors were encountered:
Currently the propagation tracks all the changed variables and when it completes a propagation cycle, it will queue up all the propagators that are affected by the vars changed in the previous cycle. It repeats until no more variables change.
While this is super efficient on the one hand it does mean having highly volatile objects during a search. Temporary queue objects are created and destroyed by the millions which is very heavy on on the GC. We probably want to take a look at some standard techniques in an attempt to mitigate that. Recycle a queue, or use two and swap them after every cycle, etc.
Uint16Array
. Together with a fixed length, the upper bound being the total number of variables, this could prevent a lot of GC related overheadThe text was updated successfully, but these errors were encountered: