Skip to content

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

Draft
valentijnscholten wants to merge 1 commit into
DefectDojo:bugfixfrom
valentijnscholten:batch-burp-request-response
Draft

perf(importers): batch BurpRawRequestResponse inserts + re-enable perf tests#14969
valentijnscholten wants to merge 1 commit into
DefectDojo:bugfixfrom
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).

…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.
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.

1 participant