perf(importers): batch BurpRawRequestResponse inserts + re-enable perf tests#14969
Draft
valentijnscholten wants to merge 1 commit into
Draft
perf(importers): batch BurpRawRequestResponse inserts + re-enable perf tests#14969valentijnscholten wants to merge 1 commit into
valentijnscholten wants to merge 1 commit into
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
save()calls inprocess_request_response_pairswithbulk_createat batch boundaries, mirroring the existinglocation_handlerpattern. Reduces DB round-trips proportionally to the number of findings with request/response data.clean()calls —BurpRawRequestResponsehas no customclean()and inherits the no-op frommodels.Model.self.pending_burp_rr(initialized inBaseImporter.__init__); flush viaflush_burp_request_response()at the same batch boundaries wherelocation_handler.persist()is called in both the importer and reimporter.TestDojoImporterPerformanceSmallandTestDojoImporterPerformanceSmallLocationswith recalibrated query counts after the RBAC→legacy authorization migration (legacy auth has lower per-action overhead, reducing counts by 1–7 queries per step).