Skip to content

Commit f8a68d8

Browse files
committed
DPL: enable prefetching only for branches with one basket
1 parent 0b01409 commit f8a68d8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Framework/Core/src/TableTreeHelpers.cxx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,11 @@ void TreeToTable::addAllColumns(TTree* tree, std::vector<std::string>&& names)
552552
tree->SetCacheSize(25000000);
553553
tree->SetClusterPrefetch(true);
554554
for (auto& reader : mBranchReaders) {
555-
tree->AddBranchToCache(reader->branch());
555+
// Unfortunately ROOT 6-32-06 is still buggy. Adding a branch to
556+
// the cache only if the number of baskets allows it.
557+
if (reader->branch()->GetListOfBaskets()->GetEntriesFast() == 1) {
558+
tree->AddBranchToCache(reader->branch());
559+
}
556560
}
557561
tree->StopCacheLearningPhase();
558562
}

0 commit comments

Comments
 (0)