Kazunobu Kuriyama wrote:

> I found the spot where the unexpected truncation of the external program
> output takes place.  It is in the `while` loop beginning at
> `os_unix.c:4765`.
> 
> For some reason (still unknown to me), the parent process (= vim)
> occasionally fails there to retrieve the whole output of the child process
> (= an external program).
> 
> This fact can be confirmed by checking the content of the local variable
> `buffer` for each iteration of the loop.  The variable is defined in the
> function `mch_call_shell()` that contains the loop.
> 
> Side Note: With some experiments, I saw the loop breaking due to timeout
> (represented by the local variable `msec` and an inequality) when the
> truncation took place.  So one of the ways to fix the issue might be to
> allow a longer timeout.  Since I can’t evaluate its side-effect for now, I
> don’t want to propose it.
> 
> As to the slowness, from my observations, it is largely governed by the I/O
> between the two different processes, Vim and an external program, through a
> pseudo terminal.
> 
> I’m now convinced that the issue is not gtk3-specific and won’t be fixed by
> modifying or improving the code relevant to it.
> 
> I’m leaving this note in hope of increasing chances of fixing the issue, as
> the issue is now an IPC I/O one and thus more people can approach it easily
> without handling bulky GUI stuff at all.

This loop is a bit complicated, since it has to both write to the
external process and read from it.  While trying not to loose typeahead.

If you think there is a problem in here somewhere, best is to write log
entries into a file with a timestamp.  Maybe you can use the ch_log()
function for that.

-- 
The coffee just wasn't strong enough to defend itself -- Tom Waits

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui