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

refactor: remove three later PURL processing in more places #1426

Merged
merged 1 commit into from
Mar 14, 2025

Conversation

ctron
Copy link
Contributor

@ctron ctron commented Mar 14, 2025

Instead of using the three PURL layers (base, version, qualifier) for building result PURLs, we only use the purl field from the qualified result, and evaluate the rest inline.

The allows us to reduce load on the database even more. I'll run a scale-test next.

Instead of using the three PURL layers (base, version, qualifier) for
building result PURLs, we only use the `purl` field from the qualified
result, and evaluate the rest inline.

The allows us to reduce load on the database even more.
Copy link
Collaborator

@JimFuller-RedHat JimFuller-RedHat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@mrizzi mrizzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ctron thanks 👍

@@ -356,11 +349,7 @@ impl SbomAdvisory {
id: each.sbom_package.node_id.clone(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can optimize this further by not returning the whole package info as I don't think it's useful in this context. That would also allow us to join less tables in the relevant_advisory_info query. But we can do that in a separate PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, I agree, there's more potential. But I didn't want to go all crazy right before a release. 😉

@ctron
Copy link
Contributor Author

ctron commented Mar 14, 2025

Either I did it wrong, or it doesn't impact performance:

image

@ctron ctron added this pull request to the merge queue Mar 14, 2025
@ctron
Copy link
Contributor Author

ctron commented Mar 14, 2025

Ah, I did it wrong indeed. 🤦 Will re-run.

Merged via the queue into trustification:main with commit f4e6cdc Mar 14, 2025
6 checks passed
@ctron ctron deleted the feature/perf_purl_1 branch March 14, 2025 09:59
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.

4 participants