emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implementing image support for kitty terminal


From: Gerd Möllmann
Subject: Re: Implementing image support for kitty terminal
Date: Fri, 9 Sep 2022 16:27:30 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.0

On 22-09-09 16:20 , Eli Zaretskii wrote:
Date: Fri, 9 Sep 2022 16:10:07 +0200
Cc: emacs-devel@gnu.org
From: Gerd Möllmann <gerd.moellmann@gmail.com>

It wouldn't be hard to buffer the writes until the update is done, I
think.

I think we already do, see this part of update_frame_1:

   /* Now update the rest of the lines.  */
   for (i = 0; i < desired_matrix->nrows - 1 && (force_p || !input_pending); 
i++)
     {
       if (MATRIX_ROW_ENABLED_P (desired_matrix, i))
        {
          if (FRAME_TERMCAP_P (f))
            {
              /* Flush out every so many lines.
                 Also flush out if likely to have more than 1k buffered
                 otherwise.   I'm told that some telnet connections get
                 really screwed by more than 1k output at once.  */
              FILE *display_output = FRAME_TTY (f)->output;
              if (display_output)
                {
                  ptrdiff_t outq = __fpending (display_output);
                  if (outq > 900
                      || (outq > 20 && ((i - 1) % preempt_count == 0)))
                    fflush (display_output);
                }
            }

Oh, right.

The comment there is also interesting. Looks like some connections don't like larger buffers, some benefit from it, some don't care. Whatever we do, it's always wrong :-).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]