1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Huge performance improvements

This commit is contained in:
tobspr
2020-09-21 18:09:27 +02:00
parent 2ac570f6d8
commit 4636080dd7
2 changed files with 80 additions and 22 deletions

View File

@@ -86,27 +86,30 @@ export class BufferMaintainer {
// Make sure our backlog never gets too big
clearBufferBacklog();
const bufferStats = getBufferStats();
const mbUsed = round1Digit(bufferStats.vramUsage / (1024 * 1024));
logger.log(
"GC: Remove",
(deletedKeys + "").padStart(4),
", Remain",
(totalKeys + "").padStart(4),
"(",
(bufferStats.bufferCount + "").padStart(4),
"total",
")",
// @ts-ignore
if (G_IS_DEV && false) {
const bufferStats = getBufferStats();
const mbUsed = round1Digit(bufferStats.vramUsage / (1024 * 1024));
logger.log(
"GC: Remove",
(deletedKeys + "").padStart(4),
", Remain",
(totalKeys + "").padStart(4),
"(",
(bufferStats.bufferCount + "").padStart(4),
"total",
")",
"(",
(bufferStats.backlogSize + "").padStart(4),
"backlog",
")",
"(",
(bufferStats.backlogSize + "").padStart(4),
"backlog",
")",
"VRAM:",
mbUsed,
"MB"
);
"VRAM:",
mbUsed,
"MB"
);
}
++this.iterationIndex;
}