Problem Statement
In ickEngine.js, the simulation sequentially awaits MarketDirector.updateOne and MarketActor.updateOne inside a or...of loop for potentially thousands of market talents. This synchronous DB await in a loop blocks the Node.js event loop severely during the weekly tick, degrading performance linearly with talent count.
Proposed Technical Approach
- Refactor the sequential updateOne loops into a single �ulkWrite operation.
- Group talent mutations into batches to drastically reduce database roundtrips.
Problem Statement
In ickEngine.js, the simulation sequentially awaits MarketDirector.updateOne and MarketActor.updateOne inside a or...of loop for potentially thousands of market talents. This synchronous DB await in a loop blocks the Node.js event loop severely during the weekly tick, degrading performance linearly with talent count.
Proposed Technical Approach