Skip to content
Snippets Groups Projects
Commit 62b1892a authored by Enrico Guiraud's avatar Enrico Guiraud
Browse files

[DF] Early-quit event loop for RDataSource+Range

RDataSource event loops did not check whether Ranges had been exhausted
and always looped until the end of the dataset in all cases.
Event processing was a no-op after Ranges had been exhausted so results
were correct but runtimes were longer than necessary.

This fixes #6455.
parent e6b5e499
No related branches found
No related tags found
No related merge requests found
......@@ -385,13 +385,13 @@ void RLoopManager::RunDataSource()
R__ASSERT(fDataSource != nullptr);
fDataSource->Initialise();
auto ranges = fDataSource->GetEntryRanges();
while (!ranges.empty()) {
while (!ranges.empty() && fNStopsReceived < fNChildren) {
InitNodeSlots(nullptr, 0u);
fDataSource->InitSlot(0u, 0ull);
try {
for (const auto &range : ranges) {
auto end = range.second;
for (auto entry = range.first; entry < end; ++entry) {
for (auto entry = range.first; entry < end && fNStopsReceived < fNChildren; ++entry) {
if (fDataSource->SetEntry(0u, entry)) {
RunAndCheckFilters(0u, entry);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment