While reading filenames in the minibuffer, tramp must decide whether it completes possible incomplete filenames, or not. Imagine there is the following situation: You have typed C-x C-f /ssh: <TAB>. tramp cannot know, whether ssh is a method or a host name. It checks therefore the last input character you have typed. If this is <TAB>, <SPACE> or ?, tramp assumes that you are still in filename completion, and it does not connect to the possible remote host ssh.
External packages, which use other characters for completing filenames
in the minibuffer, must signal this to tramp. For this case,
the variable tramp-completion-mode can be bound temporarily to
a non-nil value.
(let ((tramp-completion-mode t))
...)
When tramp runs remote processes, files on the remote host could change their attributes. Consequently, tramp must flush its complete cache keeping attributes for all files of the remote host it has seen so far.
This is a performance degradation, because the lost file attributes
must be recomputed, when needed again. In cases the caller of
process-file knows that there are file attribute changes, it
shall let-bind the variable process-file-side-effects to
nil. tramp wouldn't flush the file attributes cache then.
(let (process-file-side-effects)
...)