perf(core): allow skipping loading experiment catalogs from DB when initializing DiscoverySpace#675
Merged
AlessandroPomponio merged 1 commit intomainfrom Mar 9, 2026
Conversation
…d-only paths from_configuration unconditionally called experimentCatalog() on every construction of a DiscoverySpace. This method queries the samplestore for any externally registered experiment plugins and loads them into the actuator registry so they are available for replay during an active operation run. For read-only CLI commands (show requests, show results, show entities) this work is entirely unnecessary: these commands inspect stored measurement data and never resolve or replay experiment references. The catalog load was measured at ~852ms — a full DB query round-trip plus plugin loading overhead — paid on every invocation with no benefit. The commit adds a boolean load_experiment_catalog parameter to __init__ (default True), from_configuration and from_stored_configuration. from_operation_id, whose callers are exclusively read-only show commands, passes load_experiment_catalog=False, bypassing the experimentCatalog() call and the actuator registry update entirely. The default remains True so all other construction paths (from_configuration called directly, space creation during an active run) retain the existing behaviour without requiring changes at call sites. Measured saving on ado show requests / show results / show entities: ~852ms.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
from_configuration unconditionally called experimentCatalog() on every construction of a DiscoverySpace. This method queries the samplestore for any externally registered experiment plugins and loads them into the actuator registry so they are available for replay during an active operation run.
For read-only CLI commands (show requests, show results, show entities) this work is entirely unnecessary: these commands inspect stored measurement data and never resolve or replay experiment references. The catalog load was measured at ~852ms — a full DB query round-trip plus plugin loading overhead — paid on every invocation with no benefit.
The commit adds a boolean load_experiment_catalog parameter to init (default True), from_configuration and from_stored_configuration. from_operation_id, whose callers are exclusively read-only show commands, passes load_experiment_catalog=False, bypassing the experimentCatalog() call and the actuator registry update entirely.
The default remains True so all other construction paths (from_configuration called directly, space creation during an active run) retain the existing behaviour without requiring changes at call sites.
Measured saving on ado show requests / show results / show entities: ~852ms.