SUPERSEDES APPROVE COMMIT 21.5 RECOMMEND 21.4
Vin: The patch applies as is to 21.4:
patching file src/ChangeLog
patching file src/process-unix.c
Hunk #1 succeeded at 1327 (offset -218 lines).
>>>> "sjt" == Stephen J Turnbull
sjt> As promised, Tony! Any objections or changes to the
sjt> ChangeLog you'd like to make? NB: I did change the comment
sjt> to C style.
sjt> 2006-03-24 Tony Bennett <tbennett(a)nvidia.com>
sjt> * process-unix.c (Faccept_process_output): Reduce timeout.
My apologies (mostly to Skip) for not getting it into the 21.5.26
release. Brain needs a patch, I think.... The rationale for delay
was that I wanted to think about implementing the strategy used in
process-nt.c here, too, but that seems like overkill for now.
The semantics are the same as the original patch. I've fixed the
reference in the changelog, added a comment about the increasing
timeout strategy in the code, and added some rationale to the
changelog per Tony's request.
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.940
diff -u -r1.940 ChangeLog
--- src/ChangeLog 31 Mar 2006 19:20:45 -0000 1.940
+++ src/ChangeLog 1 Apr 2006 15:59:22 -0000
＠＠ -0,0 +1,7 ＠＠
+2006-03-23 Tony Bennett <tbennett(a)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.
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/process-unix.c,v
retrieving revision 1.57
diff -u -r1.57 process-unix.c
--- src/process-unix.c 4 Feb 2005 04:06:34 -0000 1.57
+++ src/process-unix.c 1 Apr 2006 15:59:22 -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 */
School of Systems and Information Engineering http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.