Skip to content

Commit 049c5f7

Browse files
maarten-icolivhoenen
authored andcommitted
Minor performance improvement on put
Convert `ids_properties.homogeneous_time` to an `int` before (potentially many) comparisons are executed
1 parent 79245bf commit 049c5f7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎imas/backends/imas_core/db_entry_al.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ def put(self, ids: IDSToplevel, occurrence: int, is_slice: bool) -> None:
303303
if occurrence != 0:
304304
ll_path += f"/{occurrence}"
305305

306-
time_mode = ids.ids_properties.homogeneous_time
306+
time_mode = int(ids.ids_properties.homogeneous_time)
307307
if is_slice:
308308
with self._db_ctx.global_action(ll_path, READ_OP) as read_ctx:
309309
db_time_mode = read_ctx.read_data(

0 commit comments

Comments
 (0)