~mdeslaur/ubuntu-cve-tracker:perf-part2

Last commit made on 2024-03-03
Get this branch:
git clone -b perf-part2 https://git.launchpad.net/~mdeslaur/ubuntu-cve-tracker
Only Marc Deslauriers can upload to this branch. If you are Marc Deslauriers please log in for upload directions.

Branch merges

Branch information

Name:
perf-part2
Repository:
lp:~mdeslaur/ubuntu-cve-tracker

Recent commits

fc0b575... by Marc Deslauriers

cve_lib.py: use lru_cache so it works with focal's python

Succeeded
[SUCCEEDED] unit-tests:0 (build)
[SUCCEEDED] check-cves:0 (build)
12 of 2 results
aca4f51... by Marc Deslauriers

cve_lib.py: use itertools cache on get_subproject_details()

Succeeded
[SUCCEEDED] unit-tests:0 (build)
[SUCCEEDED] check-cves:0 (build)
12 of 2 results
e429156... by Marc Deslauriers

Build up a cache of subproject CVEs and directories to improve performance

f81d2da... by Marc Deslauriers

cve_lib.py: if we're loading boilerplates, don't try in subprojects

Succeeded
[SUCCEEDED] unit-tests:0 (build)
[SUCCEEDED] check-cves:0 (build)
12 of 2 results
5a276aa... by Marc Deslauriers

check-syntax: remove disk access from is_* functions

is_active(), is_embargoed(), and is_retired() would all check if
the file existed on disk, which is expensive. Instead, just check
the path for these locations. Also, replace manual checks for the
boilerplate directory with a is_boilerplate() function.

Succeeded
[SUCCEEDED] unit-tests:0 (build)
[SUCCEEDED] check-cves:0 (build)
12 of 2 results
c6e5588... by Marc Deslauriers

Disable use of realpath() in find_external_subproject_cves()

The only remaining use of find_external_subproject_cves() is when
load_cve() loads subproject files. I can't think of a good
reason why we would need to use realpath() here, so turn it
off by default. Also make code a little less redundant.

Succeeded
[SUCCEEDED] unit-tests:0 (build)
[SUCCEEDED] check-cves:0 (build)
12 of 2 results
6a7dbc9... by Marc Deslauriers

Remove find_external_subproject_cves() use to improve performance

To check if the main CVE file incorrectly contains a subproject
entry, find_external_subproject_cves() was used but that is expensive,
so instead, just check if the entry was found in the main CVE file
instead.

b1839ea... by Marc Deslauriers

check-syntax: improve performance by eliminating subprojects check

check_cve() was attempting to determine if a specified CVE path
was in a subproject by going through all the subprojects directories,
but just to end up using find_cve(). We should just unconditionally
use find_cve() here to find the base CVE file, unless the CVE
specified a path to the boilerplates directory.

Succeeded
[SUCCEEDED] unit-tests:0 (build)
[SUCCEEDED] check-cves:0 (build)
12 of 2 results
fb76929... by Marc Deslauriers

Improve find_external_subproject_cves() performance

In find_external_subproject_cves(), only look inside subdirectories
if the CVE wasn't found in the top-level. Also, only call realpath
if the file exists. Add option to disable realpath lookups.

4ac7810... by Steve Beattie

check-syntax: only build aiases cache once

Merge branch ~mdeslaur/perf

Signed-off-by: Steve Beattie <email address hidden>
MR: https://code.launchpad.net/~mdeslaur/ubuntu-cve-tracker/+git/ubuntu-cve-tracker/+merge/461547