减少日频数据读取临时分配

This commit is contained in:
boris
2026-08-26 04:46:08 +08:00
parent d071a8a190
commit 6604afd24f
5 changed files with 23 additions and 9 deletions
+3 -3
View File
@@ -1778,11 +1778,11 @@ where
.filter(|date| self.config.end_date.map(|end| *date <= end).unwrap_or(true))
.collect::<Vec<_>>();
let has_decision_inputs = |date: NaiveDate| {
!self.data.factor_snapshots_on(date).is_empty()
&& !self.data.candidate_snapshots_on(date).is_empty()
!self.data.factor_snapshot_rows_on(date).is_empty()
&& !self.data.candidate_snapshot_rows_on(date).is_empty()
};
let has_execution_market =
|date: NaiveDate| !self.data.market_snapshots_on(date).is_empty();
|date: NaiveDate| !self.data.market_snapshot_rows_on(date).is_empty();
let mut execution_dates = Vec::new();
let mut decision_slots = Vec::new();
for (calendar_idx, execution_date) in calendar_dates.iter().copied().enumerate() {