From 3160b7ed3fd325c0ae3ea41dc9aeded97556a2ed Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Tue, 17 Aug 2010 22:51:08 +0000 Subject: Re Trac #324: proof-shell-wait: drastically reduce timeout, as some implementations perhaps wait for full time even if process output is received. Set process-adaptive-read-buffering to nil regardless of platform --- generic/proof-shell.el | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'generic') diff --git a/generic/proof-shell.el b/generic/proof-shell.el index 1978927f..8201d89e 100644 --- a/generic/proof-shell.el +++ b/generic/proof-shell.el @@ -307,14 +307,17 @@ process command." ;; (if proof-shell-unicode 'utf-8 'raw-text)) ;; process-coding-system-alist))) - ;; PG 4.0: does this setting improve performance? - ;; A: persisting delay doesn't - ;; (setq process-adaptive-read-buffering t) - (message "Starting: %s" prog-command-line) - (apply 'scomint-make (append (list proc (car prog-name-list) nil) - (cdr prog-name-list))) + (let + ;; Trac #324: default for this on MacOS (Aquamacs 2.0 (23.2), GNU) is t, + ;; whereas on Linux it is nil, and default of t gives poor performance. + ;; On Mac, t gives better profile results on homogenous + ;; test input AHundredTheorems but perhaps worse interactively? + ((process-adaptive-read-buffering nil)) + + (apply 'scomint-make (append (list proc (car prog-name-list) nil) + (cdr prog-name-list)))) (setq proof-shell-buffer (get-buffer (concat "*" proc "*"))) @@ -1616,9 +1619,9 @@ in some cases. May be called by `proof-shell-invisible-command'." (when proverproc (while (and proof-shell-busy (not quit-flag) (not (and interrupt-on-input (input-pending-p)))) - (accept-process-output proverproc 0.2) ;; NB: FIXME likely GE 23-ism - ;; assume filters ran, redisplay - (redisplay t)) + ;; FIXME: check below OK on GE 22/23.1. See Trac #324 + (accept-process-output proverproc 0.01 nil 1) + (redisplay)) (if quit-flag (error "Proof General: Quit in proof-shell-wait"))))) -- cgit v1.2.3