Skip to content

Knex adapter performance #300

Description

@DaddyWarbucks

In the _find method, countBuilder and builder should be run in parallel when possible.
https://github.com/feathersjs/feathers/blob/8ac69f4ab5094e403062e4b95be2d4437de7ea8d/packages/knex/src/adapter.ts#L188
This would basically 2x performance on the most common find queries. Instead of finding and then counting, run both in a Promise.all.

Also, investigate "returning" for update and patch methods. I see that the create method supports this. I wonder if the builder.update supports this. If so, the secondary query is no longer needed and has considerable performance gain. See the MongoDB adapter for an example.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions