Removed performance logging from loading creatures

This commit is contained in:
Stefan Zermatten
2022-05-11 13:33:56 +02:00
parent 78cd8ffc8d
commit 7a35c66904
3 changed files with 2 additions and 8 deletions

View File

@@ -9,11 +9,8 @@ export function loadCreature(creatureId, subscription) {
if (loadedCreatures.has(creatureId)) {
creature.subs.add(subscription);
} else {
console.time(`loading to memory ${creatureId}`);
creature = new LoadedCreature(subscription, creatureId);
loadedCreatures.set(creatureId, creature);
console.timeEnd(`loading to memory ${creatureId}`);
console.log('Creatures in memory: ', loadedCreatures.size);
}
subscription.onStop(() => {
unloadCreature(creatureId, subscription);
@@ -29,7 +26,6 @@ function unloadCreature(creatureId, subscription) {
creature.stop();
loadedCreatures.delete(creatureId);
}
console.log('Creatures in memory: ', loadedCreatures.size);
}
class LoadedCreature {