Attempt to fix performance :(((

This commit is contained in:
2025-01-05 07:22:23 +01:00
parent d7982493e1
commit cc1dbe5179
7 changed files with 31 additions and 35 deletions

View File

@ -12,6 +12,8 @@ class MapManager {
public async boot(): Promise<void> {
const mapRepository = new MapRepository()
const maps = await mapRepository.getAll()
await mapRepository.getEntityManager().populate(maps, mapRepository.POPULATE_ALL as never[])
await Promise.all(maps.map((map) => this.loadMap(map)))
this.logger.info(`Map manager loaded with ${Object.keys(this.maps).length} maps`)