Skywind wrote:
> Thanks for the patch,
>
> I wrote a test :
> (benchjob.vim for starting job, benchjob.py for printing 80000 lines)
>
> -----------------------------------
> benchjob.vim:
>
> function! MyCallback(job, text)
> " make cpu a little busy
> for i in range(100)
> for j in range(10)
> cbottom
> endfor
> endfor
> let text = iconv(a:text, "gbk", &encoding)
> caddexpr a:text
> cbottom
> endfunc
>
> copen 8
> cexpr "[python output]"
> wincmd k
>
> let cmd = ['/usr/bin/python', 'benchjob.py']
> let opt = {"out_cb": "MyCallback", "out_io": "pipe", "err_io": "out"}
>
> let job = job_start(cmd, opt)
>
>
>
> --------------
> benchjob.py:
>
> #! /usr/bin/env python2
> import sys
>
> for i in xrange(80000):
> sys.stdout.write('benchjob:%s: this is line %d\n'%(i, i))
> sys.stdout.flush()
>
> ----------------
> I can move cursor with the latest version (8.0.101), gui doesn't freeze as
> the older versions. But I also find some issues:
>
> 1. Although I can move cursor while benchjob.py is running, but I
> nearly can't input any thing, when I type a single character in insert
> mode, I can see the character appears in the screen, cursor moves
> right and then cursor rewinds to the head of the line, and then redraw
> the whole line. (delete the whole line at first, then display them
> again). It seems gui is very busy, especially accessing a remote vim
> from terminal.
It's hard to avoid this, since Vim is indeed 100% busy.
> 2. After a while, the output in quickfix stopped (benchjob.py isn't finished
> yet), until I move cursor or type something in vim, and it resumes and
> updates a few lines in quickfix and stops again until I type something again.
> If I don't touch my keyboard, the the output will pause forever.
That sounds like a bug. I suppose that when no key is available the
loop doesn't go back to checking for messages.
--
hundred-and-one symptoms of being an internet addict:
48. You get a tatoo that says "This body best viewed with Netscape 3.1 or
higher."
/// 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.