Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: optimize import of product related entities during csaf ingestion #1109

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

dejanb
Copy link
Contributor

@dejanb dejanb commented Dec 18, 2024

This PR improves ingestion performance of CSAF documents, by doing batch insert for products and version ranges.

Performance improvements are significant for a large csaf documents

Before:

$ time csaf scoop http://localhost:8080/api/v1/advisory etc/datasets/ds3/csaf/2023/cve-2023-44487.json

________________________________________________________
Executed in  210.75 secs      fish           external
   usr time    4.01 millis    0.07 millis    3.94 millis
   sys time   24.75 millis    1.27 millis   23.49 millis

After:

$ time csaf scoop http://localhost:8080/api/v1/advisory etc/datasets/ds3/csaf/2023/cve-2023-44487.json

________________________________________________________
Executed in   53.29 secs      fish           external
   usr time    5.26 millis    0.09 millis    5.17 millis
   sys time   27.33 millis    1.45 millis   25.88 millis

There is another area where we could significantly improve ingestion time, captured by #1110. But that should be done by the separate PR.

@dejanb dejanb requested review from ctron and helio-frota December 18, 2024 11:56
@dejanb dejanb added this pull request to the merge queue Dec 18, 2024
Merged via the queue into main with commit 678284e Dec 18, 2024
5 checks passed
@dejanb dejanb deleted the csaf-ingest-perf branch December 18, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants