From fb8321ef87348ba134aa434079726de3bca275ed Mon Sep 17 00:00:00 2001 From: Maarten Sebregts Date: Wed, 11 Feb 2026 15:52:56 +0100 Subject: [PATCH] Minor performance improvement on put Convert `ids_properties.homogeneous_time` to an `int` before (potentially many) comparisons are executed --- imas/backends/imas_core/db_entry_al.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imas/backends/imas_core/db_entry_al.py b/imas/backends/imas_core/db_entry_al.py index c9e2769..fc58270 100644 --- a/imas/backends/imas_core/db_entry_al.py +++ b/imas/backends/imas_core/db_entry_al.py @@ -303,7 +303,7 @@ def put(self, ids: IDSToplevel, occurrence: int, is_slice: bool) -> None: if occurrence != 0: ll_path += f"/{occurrence}" - time_mode = ids.ids_properties.homogeneous_time + time_mode = int(ids.ids_properties.homogeneous_time) if is_slice: with self._db_ctx.global_action(ll_path, READ_OP) as read_ctx: db_time_mode = read_ctx.read_data(