Ramel Eshed wrote:

> Running the following script in the gui (:terminal job.sh) takes more
> than 10 seconds. During that time the screen in not updated and vim is
> not responsive. Doing the same in terminal-vim is much faster, but the
> screen is updated only when the job is finished.
> 
> running this script using job_start(), for comparison, is very fast
> and seamless:
> call job_start(['/bin/sh', '-c', 'job.sh'], {'out_io': 'buffer', 'out_buf': 
> 1})
> 
> $ cat job.sh
> #!/bin/bash
> for i in `seq 1 20000`;
> do
>       echo "$i"
> done
> 
> I'm running the latest Vim (1161) on Ubuntu.

Using job_start() is always going to be faster, since with a terminal
window everything goes through the virtual terminal.  That's quite a bit
of overhead.  Partly because it supports colors and other attributes.

There is a todo item to make screen updating for the terminal more
efficient, not sure how much it helps in this case, it's mostly to skip
redrawing lines that didn't change.

-- 
hundred-and-one symptoms of being an internet addict:
231. You sprinkle Carpet Fresh on the rugs and put your vacuum cleaner
     in the front doorway permanently so it always looks like you are
     actually attempting to do something about that mess that has amassed
     since you discovered the Internet.

 /// 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