[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/consult 775c52a: consult-async: Increase read-process-o
From: |
ELPA Syncer |
Subject: |
[elpa] externals/consult 775c52a: consult-async: Increase read-process-output-max |
Date: |
Wed, 21 Jul 2021 20:57:07 -0400 (EDT) |
branch: externals/consult
commit 775c52a02ed270f3ecaa560b84d7cc47ec9a8c08
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
consult-async: Increase read-process-output-max
---
consult.el | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/consult.el b/consult.el
index cb15fdd..55dc206 100644
--- a/consult.el
+++ b/consult.el
@@ -484,12 +484,15 @@ Size of private unicode plane b.")
(defvar-local consult--narrow-overlay nil
"Narrowing indicator overlay.")
-(defvar consult--gc-threshold 67108864
+(defvar consult--gc-threshold (* 64 1024 1024)
"Large gc threshold for temporary increase.")
(defvar consult--gc-percentage 0.5
"Large gc percentage for temporary increase.")
+(defvar consult--process-chunk (* 1024 1024)
+ "Increase process output chunk size.")
+
(defvar consult--async-log
" *consult-async*"
"Buffer for async logging output used by `consult--async-process'.")
@@ -1287,10 +1290,12 @@ POINT is the point position."
BIND is the asynchronous function binding."
(declare (indent 1))
(let ((async (car bind)))
- `(let ((,async ,@(cdr bind)))
+ `(let ((,async ,@(cdr bind)) (orig-chunk))
(consult--minibuffer-with-setup-hook
(lambda ()
(when (functionp ,async)
+ (setq orig-chunk read-process-output-max
+ read-process-output-max (max read-process-output-max
consult--process-chunk))
(funcall ,async 'setup)
;; Push input string to request refresh.
;; We use a symbol in order to avoid adding lambdas to the hook
variable.
@@ -1301,7 +1306,9 @@ BIND is the asynchronous function binding."
(let ((,async (if (functionp ,async) ,async (lambda (_) ,async))))
(unwind-protect
,(macroexp-progn body)
- (funcall ,async 'destroy)))))))
+ (funcall ,async 'destroy)
+ (when orig-chunk
+ (setq read-process-output-max orig-chunk))))))))
(defun consult--async-sink ()
"Create ASYNC sink function.
@@ -3793,7 +3800,8 @@ Macros containing mouse clicks are omitted."
PROMPT is the prompt string.
The symbol at point is added to the future history."
(let* ((prompt-dir (consult--directory-prompt prompt dir))
- (default-directory (cdr prompt-dir)))
+ (default-directory (cdr prompt-dir))
+ (read-process-output-max (max read-process-output-max (* 1024 1024))))
(consult--read
(consult--async-command cmd
(consult--async-transform consult--grep-matches)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/consult 775c52a: consult-async: Increase read-process-output-max,
ELPA Syncer <=