chore(): Downgrade mikro orm (performance regression) (#13680)

**What**
After lot of investigation, we finally found one of our performance regerssion point (see [here](https://github.com/mikro-orm/mikro-orm/issues/6905)), this pr downgrade mikro orm and move the strategy back to select in where needed
This commit is contained in:
Adrien de Peretti
2025-10-03 15:31:40 +00:00
committed by GitHub
parent 8a996a82a7
commit 4165172145
6 changed files with 66 additions and 58 deletions
@@ -465,7 +465,7 @@ export function mikroOrmBaseRepositoryFactory<const T extends object>(
if (findOptions_.options.limit != null || findOptions_.options.offset) {
// TODO: from 7+ it will be the default strategy
Object.assign(findOptions_.options, {
strategy: LoadStrategy.BALANCED,
strategy: LoadStrategy.SELECT_IN,
})
}
}
@@ -494,7 +494,7 @@ export function mikroOrmBaseRepositoryFactory<const T extends object>(
if (findOptions_.options.limit != null || findOptions_.options.offset) {
// TODO: from 7+ it will be the default strategy
Object.assign(findOptions_.options, {
strategy: LoadStrategy.BALANCED,
strategy: LoadStrategy.SELECT_IN,
})
}
}
+5 -5
View File
@@ -37,11 +37,11 @@
"build": "rimraf dist && tsc --build"
},
"dependencies": {
"@mikro-orm/cli": "6.5.5",
"@mikro-orm/core": "6.5.5",
"@mikro-orm/knex": "6.5.5",
"@mikro-orm/migrations": "6.5.5",
"@mikro-orm/postgresql": "6.5.5",
"@mikro-orm/cli": "6.4.16",
"@mikro-orm/core": "6.4.16",
"@mikro-orm/knex": "6.4.16",
"@mikro-orm/migrations": "6.4.16",
"@mikro-orm/postgresql": "6.4.16",
"@opentelemetry/instrumentation-pg": "^0.44.0",
"@opentelemetry/resources": "^1.26.0",
"@opentelemetry/sdk-node": "^0.53.0",
@@ -20,7 +20,7 @@ export function setFindMethods<T>(klass: Constructor<T>, entity: any) {
if (!("strategy" in findOptions_.options)) {
if (findOptions_.options.limit != null || findOptions_.options.offset) {
Object.assign(findOptions_.options, {
strategy: LoadStrategy.BALANCED,
strategy: LoadStrategy.SELECT_IN,
})
}
}
@@ -99,7 +99,7 @@ export function setFindMethods<T>(klass: Constructor<T>, entity: any) {
if (!("strategy" in findOptions_.options)) {
Object.assign(findOptions_.options, {
strategy: LoadStrategy.BALANCED,
strategy: LoadStrategy.SELECT_IN,
})
}
@@ -64,7 +64,7 @@ export class ProductCategoryRepository extends DALUtils.MikroOrmBaseTreeReposito
}
Object.assign(findOptions_.options, {
strategy: LoadStrategy.BALANCED,
strategy: LoadStrategy.SELECT_IN,
})
return findOptions_