Repository navigation
Conversation
Removed chained `.map()` and `.slice()` array operations during candidate ticker deduplication in the backtest runner. By replacing them with a bounded `for` loop and an early exit condition, we reduce unnecessary intermediate heap allocations and garbage collection overhead in this hot execution path. Co-authored-by: toreleon <42534763+toreleon@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Closed in favor of #173. |
💡 What: Replaced the
.map(), array spread,new Set(),Array.from(), and.slice()chain insrc/agent/backtestRunner.tswith a boundedforloop that checks against aSetand pushes to a result array with an early-exit condition.🎯 Why: In the hot path of the backtesting engine, creating large intermediate arrays just to extract a bounded, unique list of strings creates unnecessary heap allocations and garbage collection pressure, slowing down the backtests.
📊 Impact: Reduces memory allocations and GC pauses during intensive backtesting by avoiding intermediate array creations for ticker string arrays.
🔬 Measurement: Verified that all backtest-related tests in
tests/team.test.tsand UI test streams pass without regressions.PR created automatically by Jules for task 15982594506218672614 started by @toreleon