Skip to content

Reduce TimeSliceFactory update allocations#9621

Open
dexhunter wants to merge 1 commit into
QuantConnect:masterfrom
dexhunter:perf-7554-share-update-data
Open

Reduce TimeSliceFactory update allocations#9621
dexhunter wants to merge 1 commit into
QuantConnect:masterfrom
dexhunter:perf-7554-share-update-data

Conversation

@dexhunter

Copy link
Copy Markdown

Summary

  • reuse one read-only filtered data collection for external non-derivative security and consolidator updates
  • preserve the separate option, future, and internal-feed update paths
  • add focused tests for shared data, derivative isolation, and internal feeds

Performance

The allocation evaluator measures TimeSliceFactory.Create with the same representative packet workload before and after this change:

Version Allocated bytes/Create
master 31,256
This PR 27,416
Reduction 3,840 (12.285641%)

This is a deterministic allocation metric rather than a CPU timing claim. The candidate repeated at 27,416 bytes/Create in both measured runs.

Public autoresearch record

This optimization was developed through an autoresearch process tracked with Weco.

Validation

  • 9 focused TimeSliceTests cases passed in the sealed source-and-test evaluation lane
  • exact output snapshots preserved ordering, counts, subscriptions, chains, update targets, deferred input behavior, and empty-collection behavior
  • evaluator negative controls rejected out-of-scope edits, reordered or dropped data, and metric instrumentation

This is a partial improvement for #7554; it does not attempt the issue's broader lazy-collection refactor.

Reuse one read-only filtered collection for external non-derivative security and consolidator updates while preserving separate derivative and internal-feed paths.

Refs QuantConnect#7554

Co-Authored-By: Aiden <aiden@weco.ai>
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