GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Framework] Add opt-in skipping of empty associated slices in grouped combinations by BongHwi · Pull Request #16005 · AliceO2Group/AliceO2

Conversation

@BongHwi

@BongHwi BongHwi commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

GroupedCombinations currently constructs typed associated slices before the consumer can check whether they are empty. For sparse associations, repeatedly constructing these slices can dominate the mixing workload, even when the consumer immediately discards empty tuples.

This change adds an explicit GroupedSlicePolicy::SkipEmpty option. It checks association counts through the existing sorted SliceCache before constructing typed slices.

  • IncludeEmpty remains the default, preserving the existing yielded stream.
  • Skipped tuples are traversed using the original grouping policy. Categories, mixing depth, partner direction and window boundaries are preserved.
  • Window metadata retains its original-policy meaning.
  • The opt-in accepts raw associated tables and retains the existing sorted-cache and lifetime requirements.

Consumers should enable this option only when processing an empty-associated tuple has no observable effects, including normalization, counters or window bookkeeping.

Performance

A three-run evaluation of an Omega2012 mixed-event workload on macOS arm64, using a fixed seven-DF input and mixing depth 10, gave the following mean CPU times:

Mode Baseline CPU SkipEmpty CPU Reduction
Xi, K0s 235.26 s 5.39 s 97.71%
Xi1530, K 151.54 s 5.63 s 96.28%

These are complete local DPL CPU times (user + system, including child processes). All valid measurements were included. The Xi, K0s baseline had a coefficient of variation of 5.19%.

The input has sparse cascade associations, so these gains are workload-dependent. Dense inputs may benefit less or incur additional cache-lookup overhead.

Validation

  • Added Arrow-backed integration coverage for Pair/Triple policies, default behavior, iterator copies, bindings, filtered grouping, cache refresh and original window metadata.
  • Rebuilt and ran the new integration scenarios together with related ASoA, ASoAHelpers and GroupSlicer coverage: 50 cases passed.
  • Separately validated the current-source Omega2012 opt-ins across twelve full-input executions, covering same-event, mixed-event and combined processing for both modes.
  • All six baseline-versus-opt-in ROOT-output comparisons passed without numerical tolerances.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
BongHwi added 2 commits October 25, 2026 05:13
@BongHwi
[Framework] Add opt-in skipping of empty grouped slices
72ee413
Filter empty associations before constructing typed slices while preserving
the original grouping policy and windows. Keep IncludeEmpty as the default
and document consumer and cache preconditions.

Add Arrow-backed integration coverage for Pair and Triple policies, iterator
copies, cache refresh, filtered grouping, bindings and window metadata.
@BongHwi
[Framework] Trim comments from grouped-slice update
5f7caad
Remove the explanatory comments added with the SkipEmpty policy and its
integration coverage. Keep existing comments, license headers and code
unchanged.
@BongHwi
BongHwi requested a review from a team as a code owner October 25, 2026 04:37
@alibuild alibuild mentioned this pull request Oct 25, 2026
Please consider the following formatting changes to #16005 BongHwi/AliceO2#3
Closed
@BongHwi
[Framework] Fix grouped-combination copyright and formatting
06cc233
Use the canonical ALICE O2 copyright wording in the integration test.
Align the empty eligibility structs with clang-format 20.
@BongHwi

BongHwi commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

This improves a lot for the event-mixing when we handle the very rare daughter case, such as v0 and cascade.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BongHwi

BongHwi commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

@aalkin Could you take a look this?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aalkin

aalkin commented Oct 26, 2026

Copy link
Copy Markdown
Member

I commend the speed up, but the approach seems unnecessarily convoluted. Do you have profiling graph for the current code? Where exactly the time is spent? What exactly the check against joined or concatenated table achieves? Also in the setCurrentGroupedCombination() method, if the code goes through skip and executes addOne, the next slice is set without the skipping it seems, as it would just call getAssociatedTables(). Checking if at least a single slice is empty for skipping also should be more efficient then ensuring that every slice has rows.

Last, but not least, there is an upcoming change in how the slicing cache is populated in #15867 which will most likely break your new tests. If you can make the tests work with both current and upcoming - perfect, if not, you can at least prepare the version for later.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@BongHwi @aalkin
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.