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
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
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
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?
Skywind wrote:
> What about provide an option "nl" in ch_read to make it better ?
>
> :call ch_read(mych, {"timeout": 0, "nl":1})
>
> returns "abc\n" for a line "abc"
> returns "\n" for an empty line
> returns "" for not enough data
>
> This will not break the plugins, and will make ch_read
Skywind wrote:
> Thanks for the patch,
>
> I wrote a test :
> (benchjob.vim for starting job, benchjob.py for printing 8 lines)
>
> ---
> benchjob.vim:
>
> function! MyCallback(job, text)
> " make cpu a little busy
> for i in range(100)
>
What about provide an option "nl" in ch_read to make it better ?
:call ch_read(mych, {"timeout": 0, "nl":1})
returns "abc\n" for a line "abc"
returns "\n" for an empty line
returns "" for not enough data
This will not break the plugins, and will make ch_read better.
It could be used in a timer
Thanks for the patch,
I wrote a test :
(benchjob.vim for starting job, benchjob.py for printing 8 lines)
---
benchjob.vim:
function! MyCallback(job, text)
" make cpu a little busy
for i in range(100)
for j in range(10)
Skywind wrote:
> The callback of "out_cb" is convenience to use, but has performance issue:
> Gui gets freezed if the background job continues outputing massive data (eg,
> grep a high frequency word "to" on the documents root, or some crazy stl
> errors).
>
> Vim is busy in receiving the
skywind3000 wrote:
> The callback of "out_cb" is convenience to use, but has performance issue:
> Gui gets freezed if the background job continues outputing massive data (eg,
> grep a high frequency word "to" on the documents root, or some crazy stl
> errors).
>
> Vim is busy in receiving the
The callback of "out_cb" is convenience to use, but has performance issue:
Gui gets freezed if the background job continues outputing massive data (eg,
grep a high frequency word "to" on the documents root, or some crazy stl
errors).
Vim is busy in receiving the data and invoking "out_cb" which
11 matches
Mail list logo