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

Add: Cache prefs in nvti_cache for handle_get_nvts #2096

Merged
merged 6 commits into from
Oct 31, 2023

Conversation

mattmundell
Copy link
Contributor

@mattmundell mattmundell commented Oct 16, 2023

What

Add the prefs to the in-memory cache of nvtis.

Why

Saves GET_NVTS from having to do an SQL statement for each NVT to get the preference counts.

time o m m '<get_nvts lean="1" skip_cert_refs="1" details="1" timeout="1" family="General" preferences_config_id="55385e2f-cd85-4a4a-954a-c89495aca669" preference_count="1" sort_field="nvts.name" sort_order="ascending"/>' > /tmp/nvts
Before PR: 3s, 3s, 4s
After PR: 2s, 2s, 2s

References

Requires greenbone/gvm-libs/pull/799

@github-actions
Copy link

Conventional Commits Report

😢 No conventional commits found.

👉 Learn more about the conventional commits usage at Greenbone.

@mattmundell mattmundell marked this pull request as ready for review October 17, 2023 13:18
@mattmundell mattmundell requested a review from a team as a code owner October 17, 2023 13:18
@mattmundell mattmundell changed the title Cache prefs in nvti_cache for handle_get_nvts Add: Cache prefs in nvti_cache for handle_get_nvts Oct 25, 2023
@timopollmeier timopollmeier merged commit 4d99fcc into greenbone:main Oct 31, 2023
9 checks passed
@mattmundell mattmundell deleted the cache-pref-counts branch October 31, 2023 10:29
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.

2 participants