shithub: riscv

Download patch

ref: 0aa00960661531ff5a635d9c418901323299e4b4
parent: e614e819e39c179945fc52cb1df0505c464620cf
author: Xiao-Yong Jin <meta.jxy@gmail.com>
date: Wed May 11 00:02:57 EDT 2022

vt: increase buffer size

This patch increases the buffer sizes in vt(1) to reduce
the latency from the roundtrip between terminal and cpu
server.

--- a/sys/src/cmd/vt/cons.h
+++ b/sys/src/cmd/vt/cons.h
@@ -8,7 +8,7 @@
 extern Consstate cs[];
 
 #define	INSET	2
-#define	BUFS	32
+#define	BUFS	256
 #define	HISTSIZ	(64*1024)	/* number of history characters */
 #define BSIZE	(8*1024)
 
--- a/sys/src/cmd/vt/main.c
+++ b/sys/src/cmd/vt/main.c
@@ -311,7 +311,7 @@
 		sysfatal("initkeyboard failed: %r");
 
 	hc[0] = chancreate(sizeof(char*), 256);	/* input to host */
-	hc[1] = chancreate(sizeof(Rune*), 8);	/* output from host */
+	hc[1] = chancreate(sizeof(Rune*), 256);	/* output from host */
 
 	cs->raw = rflag;