Replies: 1 comment
-
The primary reason to remove it, was to simplify it and that I wasn't even sure there are performance benefits, at least when using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Non-Goals
No response
Background
PR nextauthjs/adapters#335 mentions that using existing MikroORM instance made things 'flaky' but provides no details on how so. Changes were later merged as #4008 which removed the ability to pass existing instance and instead, provide config.
I argue that using multiple MikroORM instances within the same app/request is even more problematic. In most use-cases the DB is used for more than just auth and the developer will have to create another instance of MikroORM to do so. Since MikroORM utilizes IdentityMap, and as per my understanding, those are unique to each MikroORM instance (i.e. there's no global Identity Map), this leads to bugs, degraded performance, and larger memory footprint.
cc: @boredland
Proposal
I am interested in contributing.
Beta Was this translation helpful? Give feedback.
All reactions