From 62d1f374e53b63bc1c342a727ca7384803e3ba49 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sun, 7 Dec 2014 04:59:15 +0200 Subject: [PATCH] company-clang--start-process: Bind process-adaptive-read-buffering to nil This speeds up completion on my system when a lot of candidates are returned, by a factor of 2.5 (#228). Inspired by https://github.com/Sarcasm/irony-mode/issues/131#issuecomment-60008803. --- company-clang.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/company-clang.el b/company-clang.el index 90757a84b..f30bf1493 100644 --- a/company-clang.el +++ b/company-clang.el @@ -182,7 +182,8 @@ or automatically through a custom `company-clang-prefix-guesser'." (defun company-clang--start-process (prefix callback &rest args) (let ((objc (derived-mode-p 'objc-mode)) - (buf (get-buffer-create "*clang-output*"))) + (buf (get-buffer-create "*clang-output*")) + (process-adaptive-read-buffering nil)) (with-current-buffer buf (erase-buffer)) (if (get-buffer-process buf) (funcall callback nil) -- 2.39.2