emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/inf-clojure f7ec13a 160/313: Improve performance of inf-cl


From: ELPA Syncer
Subject: [nongnu] elpa/inf-clojure f7ec13a 160/313: Improve performance of inf-clojure--process-response and close #89
Date: Wed, 11 Aug 2021 10:00:07 -0400 (EDT)

branch: elpa/inf-clojure
commit f7ec13ab2fbc36e99df196eb863a75baf3b92fd6
Author: Andrea Richiardi <a.richiardi.work@gmail.com>
Commit: Bozhidar Batsov <bozhidar.batsov@gmail.com>

    Improve performance of inf-clojure--process-response and close #89
    
    Introduce double checking in the busy wait that detects if the inf-clojure
    process (the REPL) has completed and sent back everything. This removes the
    slowness that was triggered by having accept-process-output in the while 
body:
    we can take advantage now of its output to wait as well.
---
 CHANGELOG.md   | 1 +
 inf-clojure.el | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4b17de3..6421134 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@
 
 * [#79](https://github.com/clojure-emacs/inf-clojure/pull/82): Eldoc error 
when running boot repl.
 * [#83](https://github.com/clojure-emacs/inf-clojure/pull/85): No such 
namespace: complete.core in lumo REPL.
+* [#93](https://github.com/clojure-emacs/inf-clojure/pull/93): Slow response 
from inf-clojure (completions, arglists, ...).
 
 ## 2.0.1 (2017-05-18)
 
diff --git a/inf-clojure.el b/inf-clojure.el
index 95cc6da..a803d1e 100644
--- a/inf-clojure.el
+++ b/inf-clojure.el
@@ -996,8 +996,9 @@ the `inf-clojure-prompt`."
        (inf-clojure--sanitize-command command) work-buffer process nil t)
       ;; Wait for the process to complete
       (set-buffer (process-buffer process))
-      (while (null comint-redirect-completed)
-        (accept-process-output nil 1))
+      (while (and (null comint-redirect-completed)
+                  (accept-process-output process 1 0 t))
+        (sleep-for 0.01))
       ;; Collect the output
       (set-buffer work-buffer)
       (goto-char (point-min))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]