branch: master commit 62d1f374e53b63bc1c342a727ca7384803e3ba49 Author: Dmitry Gutov <dgu...@yandex.ru> Commit: Dmitry Gutov <dgu...@yandex.ru>
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 files changed, 2 insertions(+), 1 deletions(-) diff --git a/company-clang.el b/company-clang.el index 90757a8..f30bf14 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)