Skip to content

endpoint: optimize __eq__ via product_id#14806

Open
valentijnscholten wants to merge 1 commit intoDefectDojo:bugfixfrom
valentijnscholten:perf/endpoint-equality-optimize
Open

endpoint: optimize __eq__ via product_id#14806
valentijnscholten wants to merge 1 commit intoDefectDojo:bugfixfrom
valentijnscholten:perf/endpoint-equality-optimize

Conversation

@valentijnscholten
Copy link
Copy Markdown
Member

@valentijnscholten valentijnscholten commented May 4, 2026

The Endpoint equality method compares the full self.product fields. This can trigger a query to get the product details and sometimes results in a 1+N query pattern, for example during previewing of deletes.

This PR switches to comparing self.product_id.

The equivalent Location models don't have an equality method.

@valentijnscholten valentijnscholten added this to the 2.58.1 milestone May 4, 2026
@Maffooch Maffooch requested review from Jino-T, blakeaowens and dogboat May 5, 2026 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants