File tree Expand file tree Collapse file tree
asap-query-engine/src/stores/simple_map_store Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -157,6 +157,15 @@ impl SimpleMapStoreGlobal {
157157}
158158
159159/// Extracted config fields needed inside the locked batch loop.
160+ type GroupedBatch = HashMap <
161+ StoreKey ,
162+ (
163+ BatchConfig ,
164+ u64 ,
165+ Vec < ( PrecomputedOutput , Box < dyn AggregateCore > ) > ,
166+ ) ,
167+ > ;
168+
160169/// Pre-computed outside the lock to avoid per-item config lookups (Opt 4).
161170struct BatchConfig {
162171 metric : String ,
@@ -186,14 +195,7 @@ impl Store for SimpleMapStoreGlobal {
186195 // Config lookups (streaming_config HashMap access) are moved out of the hot locked
187196 // loop: each unique aggregation_id pays one lookup regardless of batch size.
188197 // Also pre-compute batch_min_ts per group to collapse N earliest-ts updates into 1.
189- let mut grouped: HashMap <
190- StoreKey ,
191- (
192- BatchConfig ,
193- u64 ,
194- Vec < ( PrecomputedOutput , Box < dyn AggregateCore > ) > ,
195- ) ,
196- > = HashMap :: new ( ) ;
198+ let mut grouped: GroupedBatch = HashMap :: new ( ) ;
197199
198200 for ( output, precompute) in outputs {
199201 let aggregation_config = self
You can’t perform that action at this time.
0 commit comments