changeset 3325:4c41ea11201a

[xemacs-hg @ 2006-04-01 16:21:11 by stephent] Increase Faccept_process_output timeout in unix_send_process. <87wte9nuac.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Sat, 01 Apr 2006 16:21:11 +0000
parents 0ac983083b5b
children dcff9e7a1fe2
files src/ChangeLog src/process-unix.c
diffstat 2 files changed, 14 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Mar 31 21:51:26 2006 +0000
+++ b/src/ChangeLog	Sat Apr 01 16:21:11 2006 +0000
@@ -1,3 +1,10 @@
+2006-03-23  Tony Bennett  <tbennett@nvidia.com>
+
+	* process-unix.c (unix_send_process): Reduce timeout for
+	Faccept_process_output to 10ms.  This dramatically speeds up many
+	functions that read from processes, eg, inferior interpreter
+	processes as in ilisp or python-mode.
+
 2006-03-31  Stephen J. Turnbull  <stephen@xemacs.org>
 
 	* XEmacs 21.5.26 "endive" is released.
--- a/src/process-unix.c	Fri Mar 31 21:51:26 2006 +0000
+++ b/src/process-unix.c	Sat Apr 01 16:21:11 2006 +0000
@@ -1545,10 +1545,13 @@
 	    }
 	  while (Lstream_was_blocked_p (XLSTREAM (p->pipe_outstream)))
 	    {
-	      /* Buffer is full.  Wait, accepting input;
-		 that may allow the program
-		 to finish doing output and read more.  */
-	      Faccept_process_output (Qnil, make_int (1), Qnil);
+	      /* Buffer is full.  Wait 10ms, accepting input; that may
+		 allow the program to finish doing output and read more.
+		 Used to be 1s, but that's excruciating.  nt_send_process
+		 uses geometrically increasing timeouts (up to 1s).  This
+		 might be a good idea here.
+	         N.B. timeout_secs = Qnil is faster than Qzero. */
+	      Faccept_process_output (Qnil, Qnil, make_int (10));
 	      /* It could have *really* finished, deleting the process */
 	      if (NILP(p->pipe_outstream))
 		return;