Skip to content

Commit

Permalink
refactor: easier management of the query pool
Browse files Browse the repository at this point in the history
  • Loading branch information
seankmartin committed Oct 21, 2024
1 parent 60447d2 commit afe184c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/util/framerate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,9 @@ export class FramerateMonitor {
}
}
}
for (let i = deletedQueryIndices.length - 1; i >= 0; i--) {
const index = deletedQueryIndices[i];
this.timeElapsedQueries.splice(index, 1);
}
this.timeElapsedQueries = this.timeElapsedQueries.filter(
(_, i) => !deletedQueryIndices.includes(i),
);
if (this.storedTimeDeltas.length > this.numStoredTimes) {
this.storedTimeDeltas = this.storedTimeDeltas.slice(-this.numStoredTimes);
}
Expand Down

0 comments on commit afe184c

Please sign in to comment.