skywind3000 wrote:
> Bram Moolenaar wrote:
> 
> > Skywind wrote:
> > 
> > > Bram Moolenaar wrote:
> > > > > This will not break the plugins, and will make ch_read better.
> > > > > It could be used in a timer for congestion control manually.
> > > > 
> > > > That changes what you get back, that is a bit strange.
> > > > How about adding a function that returns whether there is something to
> > > > read?  Could call it ch_canread().
> > > > 
> > > 
> > > I think "ch_canread()" is a nice design !
> > 
> > Please try out patch 8.0.0103, it should no longer get stuck.
> > 
> 
> After trying 8.0.0103 several times on windows/mac/debian(via ssh), 
> I believe stuck issue is fixed.
> 
> however, cpu usage is still high with this test (exceeds 92%), and I can feel 
> the lag between a keystroke and screen update, especially through a ssh 
> terminal.
> 
> At first I suppose my network bandwidth is fully filled with UI/quickfix 
> update messages. After removing the ":cbottom" lines, I find vim is still 
> very busy (cpu usage exceeds 90%) even if UI is not updated in the job 
> callback.

------
I just tried "ch_read()" in a 10Hz timer without any callback (both "callback", 
"out_cb" and "err_cb" is unset) and :caddexpr what I readed from ch_read() to 
quickfix. I got these on quickfix window:

-----------
|| [python output]                               
benchjob|8328| this is line 8328
benchjob|19927| this is line 19927
benchjob|31094| this is line 31094
benchjob|42038| this is line 42038
benchjob|53045| this is line 53045
benchjob|64103| this is line 64103
benchjob|75220| this is line 75220
--------

It appears many data have been missed when I am calling ch_read.
I suppose I can read all the data, one by one from ch_read if I don't set the 
callbacks.

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