Skip to content

Commit 43dae30

Browse files
Copilotgitosaurus
andcommitted
Optimize deep copy operations in ConfigManager initialization (#654)
* Move deep copy outside validation loop to avoid redundant copies * Remove redundant deep copy before validation loop --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: gitosaurus <6794831+gitosaurus@users.noreply.github.com>
1 parent 84157dc commit 43dae30

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/hyrax/config_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ def __init__(
206206
f"invalid structure. The configuration will be used as-is. Validation error: {e}"
207207
)
208208

209+
# Update original_config after all validations are complete
209210
self.original_config = copy.deepcopy(self.config)
210211

211212
@staticmethod

0 commit comments

Comments
 (0)