Speed up clearing all markers, mass event listener dispose

Part of microsoft/vscode#213174
This commit is contained in:
Daniel Imms
2024-06-03 11:43:31 -07:00
parent 2edc65baaa
commit dd106ae9b8
2 changed files with 7 additions and 12 deletions
+1 -1
View File
@@ -611,8 +611,8 @@ export class Buffer implements IBuffer {
this._isClearing = true;
for (let i = 0; i < this.markers.length; i++) {
this.markers[i].dispose();
this.markers.splice(i--, 1);
}
this.markers.length = 0;
this._isClearing = false;
}