Skip to content

foundy_by: optimize for dedupe#13888

Merged
Maffooch merged 3 commits intoDefectDojo:bugfixfrom
valentijnscholten:dedupe-foundby-optimize
Dec 15, 2025
Merged

foundy_by: optimize for dedupe#13888
Maffooch merged 3 commits intoDefectDojo:bugfixfrom
valentijnscholten:dedupe-foundby-optimize

Conversation

@valentijnscholten
Copy link
Member

@valentijnscholten valentijnscholten commented Dec 12, 2025

The found_by field of findings was updated on every save() call. This is only needed for the initial save().
We can also prefetch it during batch dedupe and only modify it for duplicates when it's needed.

Users can still add/remove entries from found_by as before.

For imports without any duplicates we'll see 1 extra query, but for imports with X duplicates we'll see (X-1) less queries.

Doesn't affect Pro.

Copy link
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 merged commit 0f4aad7 into DefectDojo:bugfix Dec 15, 2025
207 of 290 checks passed
@valentijnscholten valentijnscholten modified the milestones: 2.53.3, 2.53.2 Dec 15, 2025
Maffooch pushed a commit to valentijnscholten/django-DefectDojo that referenced this pull request Feb 16, 2026
* dedupe: optimize found_by

* fix: update expected query counts in performance tests

* fix: update expected query counts in performance tests
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