Skip to content

Commit 58b42fc

Browse files
committed
DPL Analysis: reserve binary views to avoid arrow preallocating extra buffers
1 parent b2ebc90 commit 58b42fc

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Framework/CCDBSupport/src/AnalysisCCDBHelpers.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ AlgorithmSpec AnalysisCCDBHelpers::fetchFromCCDB(ConfigContext const& /*ctx*/)
148148
builders.emplace_back(std::make_shared<arrow::BinaryViewBuilder>());
149149
}
150150

151+
auto reserveSize = timestampColumn->length();
152+
arrow::Status status;
153+
for (auto i = 0U; i < builders.size(); ++i) {
154+
status &= builders[i]->Reserve(reserveSize);
155+
}
156+
151157
for (auto ci = 0; ci < timestampColumn->num_chunks(); ++ci) {
152158
std::shared_ptr<arrow::Array> chunk = timestampColumn->chunk(ci);
153159
auto const* timestamps = chunk->data()->GetValuesSafe<size_t>(1);

0 commit comments

Comments
 (0)