Skip to content

Commit f144e45

Browse files
authored
Revert macOS chunking PR (microsoft#300933)
Revert PR
1 parent 898a015 commit f144e45

2 files changed

Lines changed: 0 additions & 160 deletions

File tree

src/vs/platform/terminal/node/terminalProcess.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess
110110

111111
private _isPtyPaused: boolean = false;
112112
private _unacknowledgedCharCount: number = 0;
113-
private _writeQueue: Promise<void> = Promise.resolve();
114113
get exitMessage(): string | undefined { return this._exitMessage; }
115114

116115
get currentTitle(): string { return this._windowsShellHelper?.shellTitle || this._currentTitle; }
@@ -469,32 +468,12 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess
469468
this._logService.trace('node-pty.IPty#write', data, isBinary);
470469
if (isBinary) {
471470
this._ptyProcess!.write(Buffer.from(data, 'binary'));
472-
} else if (isMacintosh && data.length > 512 && data.includes('\r')) {
473-
// macOS PTY has a ~1024-byte canonical-mode input buffer. Multiline
474-
// input exceeding this causes writes to block or corrupt due to
475-
// backpressure from the shell's line editor echoing characters.
476-
// https://github.com/microsoft/vscode/issues/296955
477-
this._writeChunked(data);
478471
} else {
479472
this._ptyProcess!.write(data);
480473
}
481474
this._childProcessMonitor?.handleInput();
482475
}
483476

484-
private _writeChunked(data: string): void {
485-
this._writeQueue = this._writeQueue.then(async () => {
486-
for (let i = 0; i < data.length; i += 512) {
487-
if (this._store.isDisposed) {
488-
return;
489-
}
490-
this._ptyProcess!.write(data.slice(i, i + 512));
491-
if (i + 512 < data.length) {
492-
await timeout(5);
493-
}
494-
}
495-
});
496-
}
497-
498477
sendSignal(signal: string): void {
499478
if (this._store.isDisposed || !this._ptyProcess) {
500479
return;

src/vs/platform/terminal/test/node/terminalProcess.test.ts

Lines changed: 0 additions & 139 deletions
This file was deleted.

0 commit comments

Comments
 (0)