Optimize and improve consistency of `mapById`
Open
bug :beetle:
feature
- Dominant language
- TypeScript
- Stars
- 7
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
Many operations retrieve multiple rows from database given multiple ids passed as input arguments. The result is then grouped by input id, using the `mapById` function. However, this function runs in `O(|results|*|inputs|)` because we iterate over the results and for each we re-iterate over the ids. A group-by operation can however be performed in `O(|results|)` only by storing into bins at each iteration of the results only.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.