-
Notifications
You must be signed in to change notification settings - Fork 23
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
Conversation
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this 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(), |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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. 😉
Ah, I did it wrong indeed. 🤦 Will re-run. |
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.