From 8f4fad9a4d03699e74808ae21fdc2fa7b0e2a161 Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Wed, 21 Jun 2023 16:29:58 +0200 Subject: check-new-issues: fix performance issue with wnpp autocompletion --- bin/check-new-issues | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/check-new-issues b/bin/check-new-issues index f87ecb7f7f..fe0ceed8a0 100755 --- a/bin/check-new-issues +++ b/bin/check-new-issues @@ -370,6 +370,7 @@ ignore_missing_bugs = read_packages_file(removed_packages_file) ignore_missing_bugs += read_packages_file(ignore_bug_file) seen_pkgs = {} +wnpp_candidates = list(wnpp_to_candidates()) for name, cve in cves.items(): if not args.list: @@ -713,7 +714,7 @@ def complete_line(text, state): # autocomplete - pkg entries if len(words) == 1 or (len(words) == 2 and being_completed): candidates = list(seen_pkgs.keys()) - candidates += list(wnpp_to_candidates()) + candidates += wnpp_candidates elif (len(words) == 2 and not being_completed) \ or (len(words) == 3 and being_completed): candidates = ' '.split() -- cgit v1.2.3