File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -234,18 +234,24 @@ class TrackPropagationModule
234234 return ; // suppress everything
235235 }
236236
237+ // Reserve every cursor filled in the loop below: reserve() switches the
238+ // cursor to the unsafe (no bounds check) append, so a cursor filled
239+ // without it pays the safe per-row append. The Par/ParExtension/DCA
240+ // tables are filled in the covariance branch as well.
241+ cursors.tracksParPropagated .reserve (tracks.size ());
242+ cursors.tracksParExtensionPropagated .reserve (tracks.size ());
243+ if (fillTracksDCA) {
244+ cursors.tracksDCA .reserve (tracks.size ());
245+ }
237246 if (fillTracksCov) {
238247 cursors.tracksParCovPropagated .reserve (tracks.size ());
239248 cursors.tracksParCovExtensionPropagated .reserve (tracks.size ());
240249 if (fillTracksDCACov) {
241250 cursors.tracksDCACov .reserve (tracks.size ());
242251 }
243- } else {
244- cursors.tracksParPropagated .reserve (tracks.size ());
245- cursors.tracksParExtensionPropagated .reserve (tracks.size ());
246- if (fillTracksDCA) {
247- cursors.tracksDCA .reserve (tracks.size ());
248- }
252+ }
253+ if (cGroup.useTrackTuner .value && cGroup.fillTrackTunerTable .value ) {
254+ cursors.tunertable .reserve (tracks.size ());
249255 }
250256
251257 for (const auto & track : tracks) {
You can’t perform that action at this time.
0 commit comments