The following code calls filterQuery just to get the pagination. It then calls paramsToAdapter which calls filterQuery again.
|
const { paginate } = this.filterQuery(params) |
Instead, that line should just use this.options.paginate. This may seem like a micro-optimization, but I am extending the filterQuery method in a way that may traverse/clone the query multiple times, even stuff like id: { $in: [...many ids] } will cause many loops/clones.
The following code calls
filterQueryjust to get the pagination. It then callsparamsToAdapterwhich callsfilterQueryagain.feathers-sequelize/src/adapter.ts
Line 260 in 320e2b0
Instead, that line should just use
this.options.paginate. This may seem like a micro-optimization, but I am extending thefilterQuerymethod in a way that may traverse/clone the query multiple times, even stuff likeid: { $in: [...many ids] }will cause many loops/clones.