Skip to content

Commit

Permalink
DPL Analysis: enable cache without prefetching
Browse files Browse the repository at this point in the history
This give the same results in terms of reduced IOPs, without
the problems with the multiple basket branches.

It also adds explicitly to the cache all the _size branches.

Not yet clear if we need to have ROOT v6.32.06-alice2 as well for
this to work correctly.
  • Loading branch information
ktf committed Oct 11, 2024
1 parent 0b01409 commit 3f4e271
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Framework/Core/src/TableTreeHelpers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -550,9 +550,17 @@ void TreeToTable::addAllColumns(TTree* tree, std::vector<std::string>&& names)
// Was affected by https://github.com/root-project/root/issues/8962
// Re-enabling this seems to cut the number of IOPS in half
tree->SetCacheSize(25000000);
tree->SetClusterPrefetch(true);
// tree->SetClusterPrefetch(true);
for (auto& reader : mBranchReaders) {
tree->AddBranchToCache(reader->branch());
if (strncmp(reader->branch()->GetName(), "fIndexArray", strlen("fIndexArray")) == 0) {
std::string sizeBranchName = reader->branch()->GetName();
sizeBranchName += "_size";
TBranch* sizeBranch = (TBranch*)tree->GetBranch(sizeBranchName.c_str());
if (sizeBranch) {
tree->AddBranchToCache(sizeBranch);
}
}
}
tree->StopCacheLearningPhase();
}
Expand Down

0 comments on commit 3f4e271

Please sign in to comment.