change batch size to 500

This commit is contained in:
Jörg Breitbart
2022-12-05 20:03:25 +01:00
parent 4084dc3949
commit 309ba47483
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -269,9 +269,9 @@ export class Buffer implements IBuffer {
let counted = 0;
for (let i = 0; i < this.lines.length; i++) {
counted += this.lines.get(i)!.cleanupMemory();
// throttle to 5k lines at once and
// throttle to 500 lines at once and
// return true to indicate, that the task is not finished yet
if (counted > 5000) {
if (counted > 500) {
return true;
}
}
+2 -2
View File
@@ -340,8 +340,8 @@ export class BufferLine implements IBufferLine {
* Resize BufferLine to `cols` filling excess cells with `fillCellData`.
* The underlying array buffer will not change if there is still enough space
* to hold the new buffer line data.
* Returns a boolean indicating, whether a `cleanBuffer` call would free
* excess memory (after shrinking > CLEANUP_THRESHOLD).
* Returns a boolean indicating, whether a `cleanupMemory` call would free
* excess memory (true after shrinking > CLEANUP_THRESHOLD).
*/
public resize(cols: number, fillCellData: ICellData): boolean {
if (cols === this.length) {