Skip to content

perf(importers): batch BurpRawRequestResponse inserts + re-enable perf tests#14969

Merged
valentijnscholten merged 2 commits into
DefectDojo:devfrom
valentijnscholten:batch-burp-request-response
Jun 17, 2026
Merged

perf(importers): batch BurpRawRequestResponse inserts + re-enable perf tests#14969
valentijnscholten merged 2 commits into
DefectDojo:devfrom
valentijnscholten:batch-burp-request-response

Conversation

@valentijnscholten

Copy link
Copy Markdown
Member

Summary

  • Replace per-finding save() calls in process_request_response_pairs with bulk_create at batch boundaries, mirroring the existing location_handler pattern. Reduces DB round-trips proportionally to the number of findings with request/response data.
  • Drop the no-op clean() calls — BurpRawRequestResponse has no custom clean() and inherits the no-op from models.Model.
  • Accumulate objects in self.pending_burp_rr (initialized in BaseImporter.__init__); flush via flush_burp_request_response() at the same batch boundaries where location_handler.persist() is called in both the importer and reimporter.
  • Re-enable TestDojoImporterPerformanceSmall and TestDojoImporterPerformanceSmallLocations with recalibrated query counts after the RBAC→legacy authorization migration (legacy auth has lower per-action overhead, reducing counts by 1–7 queries per step).

@valentijnscholten valentijnscholten marked this pull request as ready for review June 7, 2026 19:42
@valentijnscholten valentijnscholten added this to the 2.60.0 milestone Jun 7, 2026

@mtesauro mtesauro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved

@mtesauro mtesauro requested review from Jino-T, blakeaowens, dogboat and rossops and removed request for Jino-T and Maffooch June 8, 2026 21:23
…f tests

Replace per-finding save() calls in process_request_response_pairs with
bulk_create at batch boundaries, mirroring the location_handler pattern.
Reduces DB round-trips proportionally to findings with req/resp data.
Drops the no-op clean() calls (BurpRawRequestResponse has no custom clean).

Re-enable TestDojoImporterPerformanceSmall and TestDojoImporterPerformanceSmallLocations
with recalibrated query counts after the RBAC→legacy authorization migration.
Batch BurpRawRequestResponse inserts reduce per-finding saves for the ZAP
parser (which emits req/resp pairs). Update expected counts to match.
@valentijnscholten valentijnscholten force-pushed the batch-burp-request-response branch from e7be3b9 to 655e09f Compare June 17, 2026 20:28
@github-actions github-actions Bot added settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR docs ui helm labels Jun 17, 2026
@valentijnscholten valentijnscholten changed the base branch from bugfix to dev June 17, 2026 20:29
@valentijnscholten valentijnscholten merged commit 8ef84e3 into DefectDojo:dev Jun 17, 2026
149 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs helm settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR ui unittests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants