Skip to content

perf2: skip post processing if not needed#12862

Merged
valentijnscholten merged 14 commits intoDefectDojo:bugfixfrom
valentijnscholten:product-grade-skip-in-save
Jul 31, 2025
Merged

perf2: skip post processing if not needed#12862
valentijnscholten merged 14 commits intoDefectDojo:bugfixfrom
valentijnscholten:product-grade-skip-in-save

Conversation

@valentijnscholten
Copy link
Copy Markdown
Member

There'll be a sequence of import performance related PRs. They are separated into small PRs to simplify review and troubleshooting. As they all use test_importers_performance, they'll build on eachother. So they'll have to be merged by natural ordering.

The finding.save() method creates an async task to postprocess the finding even if it's not needed. This is mainly of importance if product grading is disabled. In that case post processing is not needed, so we shouldn't create a celery task.
The celery task would exit quite fast, but still it would incur cpu cycles, redis cycles and at least 1 database query.
Let's save some trees and possibly some cost.

@valentijnscholten valentijnscholten added this to the 2.49.0 milestone Jul 27, 2025
@valentijnscholten valentijnscholten marked this pull request as ready for review July 27, 2025 08:55
@dryrunsecurity
Copy link
Copy Markdown

dryrunsecurity Bot commented Jul 27, 2025

DryRun Security

No security concerns detected in this pull request.


All finding details can be found in the DryRun Security Dashboard.

Copy link
Copy Markdown
Contributor

@mtesauro mtesauro left a comment

Choose a reason for hiding this comment

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

Approved

@Maffooch Maffooch requested review from blakeaowens and dogboat July 28, 2025 23:42
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions Bot added docker New Migration Adding a new migration file. Take care when merging. docs integration_tests ui parser helm and removed helm labels Jul 31, 2025
@valentijnscholten valentijnscholten force-pushed the product-grade-skip-in-save branch from 0a7c486 to 3858ea3 Compare July 31, 2025 06:06
@github-actions github-actions Bot removed docker New Migration Adding a new migration file. Take care when merging. docs integration_tests ui parser helm labels Jul 31, 2025
@github-actions
Copy link
Copy Markdown
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@valentijnscholten valentijnscholten merged commit 794d861 into DefectDojo:bugfix Jul 31, 2025
86 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants