Skip to content

Commit bb051fc

Browse files
liudgerCopilot
andcommitted
Potential fix for repeated linear scans
avoids repeated linear scans, using set Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent fc28957 commit bb051fc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/bsblan/bsblan.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1120,8 +1120,9 @@ def _apply_include_filter(
11201120
return params
11211121
if not include:
11221122
raise BSBLANError(ErrorMsg.EMPTY_INCLUDE_LIST)
1123+
include_set = set(include)
11231124
filtered = {
1124-
param_id: name for param_id, name in params.items() if name in include
1125+
param_id: name for param_id, name in params.items() if name in include_set
11251126
}
11261127
if not filtered:
11271128
raise BSBLANError(ErrorMsg.INVALID_INCLUDE_PARAMS)

0 commit comments

Comments
 (0)