Attempt to fix performance :(((
This commit is contained in:
@ -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`)
|
||||
|
Reference in New Issue
Block a user