Skip to content

Use mongodb exported bson instead of mongoose to import bson separately? #15154

Open
@zurmokeeper

Description

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested

🚀 Feature Proposal

When using chrome's memory to do a snapshot analysis of node.js references, I found that the bson library takes up a lot of memory, about 3-4M (estimated), especially if the project may reference multiple bson libraries.

I see that mongodb already has an API for exporting bson, so why does mongoose have to reference bson separately?

If I use mongodb's bson, then I can reference a mongoose, and I don't need to bring in mongodb and its dependent bson libraries.

It would be more memory efficient.

Motivation

No response

Example

No response

Metadata

Assignees

No one assigned

    Labels

    developer-experienceThis issue improves error messages, debugging, or reporting

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions