Skip to content

Commit b7efede

Browse files
gudnimgkartben
authored andcommitted
scripts: kconfig: optimize write_kconfig_filenames
Filter duplicate entries in `kconf.kconfig_filenames` before calling `os.path.realpath`. Before (current code), all entries in `kconf.kconfig_filenames` go through `os.path.realpath`. Including all duplicate entries. With the proposed change, the duplicate entries are removed before calling `os.path.realpath`. Signed-off-by: Guðni Már Gilbert <[email protected]>
1 parent bcfb148 commit b7efede

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/kconfig/kconfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def write_kconfig_filenames(kconf, kconfig_list_path):
294294

295295
with open(kconfig_list_path, 'w') as out:
296296
for path in sorted({os.path.realpath(os.path.join(kconf.srctree, path))
297-
for path in kconf.kconfig_filenames}):
297+
for path in set(kconf.kconfig_filenames)}):
298298
print(path, file=out)
299299

300300

0 commit comments

Comments
 (0)