Massively improve performance of message caching (#573)

This commit is contained in:
Schuyler Cebulskie
2016-08-31 05:05:15 -04:00
committed by Amish Shah
parent f02cc27735
commit dbda589088

View File

@@ -166,7 +166,7 @@ class TextBasedChannel {
}
if (this.messages.size >= maxSize) {
this.messages.delete(Array.from(this.messages.keys())[0]);
this.messages.delete(this.messages.keys().next().value);
}
this.messages.set(message.id, message);