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
this.collectCyclesAtEnd && Transaction.currentTransaction == null did not seem to do the trick for me. Will need to think about this one some more.
clinuxrulz
changed the title
collectCycles() is being called hundreds of times in a single transaction (Performance issue)
collectCycles() is being called many times in a single transaction (Performance issue)
Mar 8, 2019
Could this be from Transaction.post which is updating cell values before the next transactions? Like the updating of cells causing many intermediate transactions re-triggering collectCycles() over and over again. We might just need a better location to call collectCycles().
When I was profiling some slow code at work, collectCycles()'s total time was 80% compared to other total times. The "temporary work-around hook" I've listed above made the problem completely go away, but it can only be used if your using sodiumjs for the browser. If your using sodiumjs for node.js or some other target, then we probably wont have window.setTimeout() available.
I think in Transaction.ts:
needs to change to:
I tried out a hook to see how often collectCycles was called in 1 transaction via:
And it was called way too many times.
I've got a temporary work-around hook though, so it is not causing me grief at the moment:
The text was updated successfully, but these errors were encountered: