Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PERF: delay preset loading for hutch-python #394

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
394 perf_defer_preset_loading
#############################

API Changes
-----------
- N/A

Features
--------
- N/A

Bugfixes
--------
- N/A

Maintenance
-----------
- Enable the deferral of preset loading to avoid a pre-mature performance hit

Contributors
------------
- tangkong
6 changes: 4 additions & 2 deletions hutch_python/load_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,10 +583,12 @@ def load_conf(conf, hutch_dir=None, args=None):
path.mkdir()
path.chmod(0o777)
if experiment is None:
setup_preset_paths(hutch=beamline_presets)
setup_preset_paths(hutch=beamline_presets,
defer_loading=True)
else:
setup_preset_paths(hutch=beamline_presets,
exp=experiment_presets)
exp=experiment_presets,
defer_loading=True)

# configure objects
if obj_config is not None:
Expand Down