Martin Apel <[email protected]> writes:
> Hi Michael,
Hi Martin,
> Unfortunately it still takes long to load a file via SMB, although the
> numbers have changed a bit.
> These are the timings with your patch applied:
>
> tramp-accept-process-output 70 6.9326070000 0.0990372428
> accept-process-output 70 6.9289739999 0.0989853428
>
> These are the timings without your patch:
>
> tramp-accept-process-output 7 6.910483 0.9872118571
> accept-process-output 7 0.903947 0.1291352857
I see. So we can conclude it doesn't happen because of `accept-process-output'.
I have observed another strange thing. When I copy an smbclient command
from the Tramp traces, and I drop it into an open smbclient connection
in a shell, it takes long until the whole command string is pasted. It
looks like smbclient reads character by character, and applies a little
pause between every read character.
I have tried to make tramp-smb faster by setting chunksize to 1 (this
makes Tramp sending every single character sequentially, instead of
sending the whole command string at once). This seems to improve the speed.
Could you, please, test the adapted patch?
--8<---------------cut here---------------start------------->8---
*** ~/src/tramp/lisp/tramp-smb.el.~2.160~ 2012-10-23 14:25:26.764160590
+0200
--- ~/src/tramp/lisp/tramp-smb.el 2012-10-23 14:17:20.999213206 +0200
***************
*** 1680,1687 ****
;; Set chunksize. Otherwise, `tramp-send-string' might
;; try it itself.
(tramp-set-connection-property p "smb-share" share)
! (tramp-set-connection-property
! p "chunksize" tramp-chunksize))
;; Check for the error reason. If it was due to wrong
;; password, reestablish the connection. We cannot
--- 1680,1686 ----
;; Set chunksize. Otherwise, `tramp-send-string' might
;; try it itself.
(tramp-set-connection-property p "smb-share" share)
! (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,1723 ****
(while (and (not found) (not err) (memq (process-status p) '(run open)))
;; Accept pending output.
! (tramp-accept-process-output p)
;; Search for prompt.
(goto-char (point-min))
--- 1716,1722 ----
(while (and (not found) (not err) (memq (process-status p) '(run open)))
;; Accept pending output.
! (tramp-accept-process-output p 0.1)
;; Search for prompt.
(goto-char (point-min))
***************
*** 1731,1737 ****
(while (and (not found) (memq (process-status p) '(run open)))
;; Accept pending output.
! (tramp-accept-process-output p)
;; Search for prompt.
(goto-char (point-min))
--- 1730,1736 ----
(while (and (not found) (memq (process-status p) '(run open)))
;; Accept pending output.
! (tramp-accept-process-output p 0.1)
;; Search for prompt.
(goto-char (point-min))
--8<---------------cut here---------------end--------------->8---
> Best Regards,
>
> Martin
Best regards, Michael.
_______________________________________________
Tramp-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/tramp-devel