Skip to content

[6.40] [RF][HS3] Significantly speed up JSON import of large models#22580

Merged
guitargeek merged 3 commits into
root-project:v6-40-00-patchesfrom
root-project-bot:BP_6.40_pull_22502
Jun 11, 2026
Merged

[6.40] [RF][HS3] Significantly speed up JSON import of large models#22580
guitargeek merged 3 commits into
root-project:v6-40-00-patchesfrom
root-project-bot:BP_6.40_pull_22502

Conversation

@root-project-bot

Copy link
Copy Markdown

Backport of #22502, requested by @guitargeek.

This speeds up the workspace factory language if the same constructors
are used repeatedly, which is quite common when models are built
programmatically.

(cherry picked from commit a0c799b)
Fast-path importers for RooProduct, RooAddition, and RooProdPdf that
bypass the generic factory-expression mechanism, which is quite
expensive because it uses the interpreter. This dramatically speeds up
the import of models from JSON that use instances of these common
classes in large numbers.

(cherry picked from commit fbf5e87)
Looking up by name in the JSON tree is quite slow and happens often
during model import from JSON. Caching the pointers to the JSON nodes
corresponding to the RooAbsArgs (distributions and functions) speeds up
JSON import significantly.

(cherry picked from commit 149cca4)
@guitargeek guitargeek merged commit 1a594a3 into root-project:v6-40-00-patches Jun 11, 2026
37 of 38 checks passed
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.

3 participants