[vulndb] all: Remove O(N^2) alias check and redundant disk I/O

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Dec 26, 2025, 9:17:56 PM (2 days ago) Dec 26
to Ethan Lee, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Roland Shoemaker, Go LUCI, golang-co...@googlegroups.com

Gopher Robot submitted the change

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
Auto-Submit: Ethan Lee <etha...@google.com>
Reviewed-by: Roland Shoemaker <rol...@golang.org>
Files:
  • M all_test.go
Change size: S
Delta: 1 file changed, 23 insertions(+), 12 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Roland Shoemaker
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: vulndb
Gerrit-Branch: master
Gerrit-Change-Id: I76d9fae0c8dae0dc8d719902aa3e8bbcad2dccb8
Gerrit-Change-Number: 732800
Gerrit-PatchSet: 3
Gerrit-Owner: Ethan Lee <etha...@google.com>
Gerrit-Reviewer: Ethan Lee <etha...@google.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Roland Shoemaker <rol...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages