Let maps handle the deduplication logic to increase performance / improve response times.
Commit Deduplicate IDs in eager loads. introduced nested loops to filter duplicate foreign key IDs that are passed to the WhereIn-Function.
We noticed that the nested-loop-implementation of the deduplication logic results in bad performance as the number of eagerly loaded entities increases: #267.
We considered completely dropping the deduplication since databases treat IN clauses as sets.
The map-implementation improves performance and keeps the resulting SQL statements "backwards-compatible".
Let maps handle the deduplication logic to increase performance / improve response times.
Commit Deduplicate IDs in eager loads. introduced nested loops to filter duplicate foreign key IDs that are passed to the
WhereIn
-Function. We noticed that the nested-loop-implementation of the deduplication logic results in bad performance as the number of eagerly loaded entities increases: #267.We considered completely dropping the deduplication since databases treat IN clauses as sets. The map-implementation improves performance and keeps the resulting SQL statements "backwards-compatible".
Please let us know if anything is missing!