From f7eac6d887b7768034e40f16dacbb0c8fb569417 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 23 Oct 2012 16:26:30 +0200 Subject: * net/tramp-smb.el (tramp-smb-maybe-open-connection): Set `tramp-chunksize' to 1. This improves the performance. (tramp-smb-wait-for-output): Add timeout to `tramp-accept-process-output' calls. --- lisp/ChangeLog | 7 +++++++ lisp/net/tramp-smb.el | 12 ++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7670e9c35b6..39c6b96fba4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2012-10-23 Michael Albinus + + * net/tramp-smb.el (tramp-smb-maybe-open-connection): Set + `tramp-chunksize' to 1. This improves the performance. + (tramp-smb-wait-for-output): Add timeout to + `tramp-accept-process-output' calls. + 2012-10-23 Chong Yidong * faces.el (font-list-limit): Define as an obsolete variable. diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 567f8f2969a..f52129919cc 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -1677,11 +1677,11 @@ If ARGUMENT is non-nil, use it as argument for (tramp-set-connection-property vec "smbserver-version" smbserver-version)))) - ;; Set chunksize. Otherwise, `tramp-send-string' might - ;; try it itself. + ;; Set chunksize to 1. smbclient reads its input + ;; character by character; if we send the string + ;; at once, it is read painfully slow. (tramp-set-connection-property p "smb-share" share) - (tramp-set-connection-property - p "chunksize" tramp-chunksize)) + (tramp-set-connection-property p "chunksize" 1)) ;; Check for the error reason. If it was due to wrong ;; password, reestablish the connection. We cannot @@ -1717,7 +1717,7 @@ Returns nil if an error message has appeared." (while (and (not found) (not err) (memq (process-status p) '(run open))) ;; Accept pending output. - (tramp-accept-process-output p) + (tramp-accept-process-output p 0.1) ;; Search for prompt. (goto-char (point-min)) @@ -1731,7 +1731,7 @@ Returns nil if an error message has appeared." (while (and (not found) (memq (process-status p) '(run open))) ;; Accept pending output. - (tramp-accept-process-output p) + (tramp-accept-process-output p 0.1) ;; Search for prompt. (goto-char (point-min)) -- cgit v1.2.1