Skip to content

⚡ Bolt: [Optimize Ticker Deduplication in Backtest Runner] - #172

Closed
toreleon wants to merge 1 commit into
masterfrom
bolt-optimize-backtest-ticker-dedupe-15982594506218672614
Closed

toreleon wants to merge 1 commit into
masterfrom
bolt-optimize-backtest-ticker-dedupe-15982594506218672614

Conversation

@toreleon

@toreleon toreleon commented Oct 3, 2026

Copy link
Copy Markdown
Owner

💡 What: Replaced the .map(), array spread, new Set(), Array.from(), and .slice() chain in src/agent/backtestRunner.ts with a bounded for loop that checks against a Set and 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.ts and UI test streams pass without regressions.


PR created automatically by Jules for task 15982594506218672614 started by @toreleon

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>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@toreleon

toreleon commented Oct 7, 2026

Copy link
Copy Markdown
Owner Author

Closed in favor of #173.

@toreleon toreleon closed this Oct 7, 2026
@toreleon
toreleon deleted the bolt-optimize-backtest-ticker-dedupe-15982594506218672614 branch October 7, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant