Skip to content
This repository has been archived by the owner on Mar 15, 2023. It is now read-only.

Multi create/patch/remove performance #219

Closed
DaddyWarbucks opened this issue Dec 6, 2022 · 1 comment · May be fixed by feathersjs/feathers#2945
Closed

Multi create/patch/remove performance #219

DaddyWarbucks opened this issue Dec 6, 2022 · 1 comment · May be fixed by feathersjs/feathers#2945

Comments

@DaddyWarbucks
Copy link
Contributor

When using multi: true, the create method is slow. See: https://discord.com/channels/509848480760725514/1049386346030047293

Solutions

  • This line:
    return Promise.all(Object.values(result.insertedIds).map(_id => this.Model.findOne({ _id }, options)));
    should probably use { _id: { $in: [result.insertedIds] } }
  • Implement some $returning: false or $limit: 0 to disable Feathers from returning results.
@daffl
Copy link
Member

daffl commented Mar 15, 2023

I think this will be addressed via feathersjs/feathers#2945 - closing this issue to archive this repository since it has moved.

@daffl daffl closed this as completed Mar 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants