Skip to content

[ntuple] Speed up RNTupleImporter and fix uncompressed Double32_t - #23447

Open
apeters1971 wants to merge 3 commits into
root-project:masterfrom
apeters1971:rntuple-improvements
Open

apeters1971 wants to merge 3 commits into
root-project:masterfrom
apeters1971:rntuple-improvements

Conversation

@apeters1971

Copy link
Copy Markdown

This Pull request:

Generic RNTuple write/import improvements.

Changes or fixes:

  • Faster RNTupleImporter: cache leaf-count field layout (offset, value size, branch index) after Freeze(). GetConstSubfields() was allocating a new vector on every TTree entry and kept import single-threaded. After this, fill can keep pace with IMT page compression.
  • Richer import report: RImportReport / GetLastImportReport() expose compressed page payload, uncompressed pages, and destination TFile size after the writer commits.
  • Clearer buffered-cluster errors: RPageSinkBuf checks that every page is sealed (and has a checksum when same-page merging requires one) before CommitCluster, instead of failing later with a null buffer.
  • Uncompressed Double32_t: with SetCompression(0), store kReal32 instead of always forcing kSplitReal32. Default compressed writes are unchanged (kSplitReal32). This is an existing column type, not a format version change.

Checklist:

  • tested changes locally
  • updated the docs (if necessary)
    This PR fixes #

Double32_t always forced split encoding, even with compression off. Use kReal32 when there is nothing to encode against.
Add RImportReport so Import() exposes compressed page payload, uncompressed pages, and the destination TFile size after the writer commits.
GetConstSubfields() was allocating a new vector on every TTree entry, which made tree2ntuple and other imports much slower than they should be. Caching the leaf-count layout once removes that bottleneck and makes the conversion run much quicker.

@jblomer jblomer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants