Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Increase output buffer size
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Balazs Kezes  
View profile  
 More options Jul 29 2012, 9:41 am
From: Balazs Kezes <rlblas...@gmail.com>
Date: Sun, 29 Jul 2012 15:41:13 +0200
Local: Sun, Jul 29 2012 9:41 am
Subject: Increase output buffer size
Hi,

My vim seems to flicker on big terminals because the output buffer is
limited to 2K. Outputting a full redraw of large screen needs much more
characters (especially if it has lots of colors). Currently it is
distributed to several writes (separated by several milliseconds on my
slow machine). This causes that when I press Page Down for example I can
see the black flicker in bottom part of the terminal.

I propose increasing this buffer to 64K. So in src/term.c:
-#  define OUT_SIZE     2047
+#  define OUT_SIZE     65535

Thanks!

Balazs


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ben Schmidt  
View profile  
 More options Aug 1 2012, 11:04 am
From: Ben Schmidt <mail_ben_schm...@yahoo.com.au>
Date: Thu, 02 Aug 2012 01:04:43 +1000
Local: Wed, Aug 1 2012 11:04 am
Subject: Re: Increase output buffer size
On 29/07/12 11:41 PM, Balazs Kezes wrote:

> My vim seems to flicker on big terminals because the output buffer is
> limited to 2K. Outputting a full redraw of large screen needs much more
> characters (especially if it has lots of colors). Currently it is
> distributed to several writes (separated by several milliseconds on my
> slow machine). This causes that when I press Page Down for example I can
> see the black flicker in bottom part of the terminal.

> I propose increasing this buffer to 64K. So in src/term.c:
> -#  define OUT_SIZE        2047
> +#  define OUT_SIZE        65535

This sounds like a good idea to me.

Ben.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bram Moolenaar  
View profile  
 More options Aug 2 2012, 6:32 am
From: Bram Moolenaar <B...@Moolenaar.net>
Date: Thu, 02 Aug 2012 12:32:02 +0200
Local: Thurs, Aug 2 2012 6:32 am
Subject: Re: Increase output buffer size

Ben Schmidt wrote:
> On 29/07/12 11:41 PM, Balazs Kezes wrote:
> > My vim seems to flicker on big terminals because the output buffer is
> > limited to 2K. Outputting a full redraw of large screen needs much more
> > characters (especially if it has lots of colors). Currently it is
> > distributed to several writes (separated by several milliseconds on my
> > slow machine). This causes that when I press Page Down for example I can
> > see the black flicker in bottom part of the terminal.

> > I propose increasing this buffer to 64K. So in src/term.c:
> > -#  define OUT_SIZE   2047
> > +#  define OUT_SIZE   65535

> This sounds like a good idea to me.

The purpose of the output buffer is not to avoid flicker.  It's to avoid
many small updates, which is slow.

Computers have much more memory now, thus we could make the buffer
bigger.  But they are also much faster, thus the need for reducing the
number of calls is smaller.  I suppose making it 8K would be OK.

I'm mainly worried about slow remote connections.  Personally that's
where I sometimes have problems (ssh over GPRS).  I'm not sure what the
relation is between the buffer size and responsiveness.  While typing
out_flush() should be called quite often.

--
% cat /usr/include/sys/errno.h
#define EPERM           1               /* Operation not permitted */
#define ENOENT          2               /* No such file or directory */
#define ESRCH           3               /* No such process */
[...]
#define EMACS           666             /* Too many macros */
%

 /// Bram Moolenaar -- B...@Moolenaar.net -- 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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Balazs  
View profile  
 More options Aug 3 2012, 2:07 am
From: Balazs <rlblas...@gmail.com>
Date: Thu, 2 Aug 2012 23:07:40 -0700 (PDT)
Local: Fri, Aug 3 2012 2:07 am
Subject: Re: Increase output buffer size

> Computers have much more memory now, thus we could make the buffer
> bigger. [...] I suppose making it 8K would be OK.

I'm even doubting a bit that 64K is enough for all cases. Maybe a
configuration option for this size would be better (defaulting to 64K
but others can reduce/increase the size depending on their needs)?

> But they are also much faster, thus the need for reducing the number
> of calls is smaller.

Yeah, they are faster, but mine is slow enough that I see the partial
update on most terminals. :(

> I'm mainly worried about slow remote connections. Personally that's
> where I sometimes have problems (ssh over GPRS).

I think that's where this change would shine! Suppose that vim does a
full screen update (e.g. you press page down) and this means outputting
13K bytes to the terminal. Vim does the update quite quickly but
depending on your TCP settings and the time between the actual writes
this might happen: In the 2K buffer size case the operating system sees
a bunch of 2K buffers and this might result a bunch of partial packets
whereas 13K would ensure that the packets are always full length thus it
should need less packets to transmit the full update.

> I'm not sure what the relation is between the buffer size and
> responsiveness.  While typing out_flush() should be called quite
> often.

It is called quite often already. Vim won't wait for the buffer to fill
when you append a character to a line. That's only a several character
update and because you can see that the character is immediately
outputted it means the output buffer is flushed often.

My only problem is when vim does a full screen update, that's the only
case when a 2K buffer is not enough (it is enough for any other update).

Thanks!

Balazs


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »