Gopher Robot submitted the change![Open in Gerrit]()
Change information
Commit message:
all: remove O(N^2) alias check and redundant disk I/O
TestLintReports was hitting the 10-minute timeout in CI due to scaling
bottlenecks as the vulnerability database grows. This change
optimizes the test to scale linearly with the number of reports.
- Eliminate redundant disk I/O by retrieving reports directly from
the report.LocalClient's memory instead of re-reading and
re-parsing YAML files from disk inside every parallel subtest.
- Optimize the duplicate alias check from O(N^2) to O(N) by
pre-building a map. This replaces the repeated calls
to ReportsByAlias which scaled poorly.
Change-Id: I76d9fae0c8dae0dc8d719902aa3e8bbcad2dccb8
Change size: S
Delta: 1 file changed, 23 insertions(+), 12 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Code-Review: +2 by Roland Shoemaker
TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Gerrit-MessageType: merged
Gerrit-Project: vulndb
Gerrit-Branch: master
Gerrit-Change-Id: I76d9fae0c8dae0dc8d719902aa3e8bbcad2dccb8
Gerrit-Change-Number: 732800
Gerrit-PatchSet: 3