From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Implementing image support for kitty terminal Date: Fri, 09 Sep 2022 17:20:15 +0300 Message-ID: <835yhwd3z4.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9277"; mail-complaints-to="usenet@ciao.gmane.io" Cc: tomas@tuxteam.de, emacs-devel@gnu.org To: Gerd =?utf-8?Q?M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 09 16:21:12 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oWesZ-0002Id-MO for ged-emacs-devel@m.gmane-mx.org; Fri, 09 Sep 2022 16:21:11 +0200 Original-Received: from localhost ([::1]:48738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWesY-0007CE-Jq for ged-emacs-devel@m.gmane-mx.org; Fri, 09 Sep 2022 10:21:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWerw-0006RS-Cr for emacs-devel@gnu.org; Fri, 09 Sep 2022 10:20:32 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40010) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWerw-0002o7-3e; Fri, 09 Sep 2022 10:20:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=PNtZ+kUjBYssV4A20taOuKD/Qb1XA7H2jeYRAsAM5wo=; b=T9dwD8i11b1I340Y3sgk z2eNtzJYqAq+lpzlTxP703upFvjQ7cZFs8rRFrHbc2OQMGvtUU/dPSEZThaj2AQbdt98errfGo0ya WOY9lz1uZpeaylSDemZAEI91//r2YMGOtnr54Pq3oT86BLCh0zNwf+x6JFB7569kimf5xfy5b/5hP O0HtkrycpHxmQX4KOquXlzSV7GD8HvXnTlZzXWql8E88VfOFd99y7xbPsYYBWfrJB04cFIzyePVsm Orhq5qo6M0kLvUG40x1PmeWZZKd2hTvyymvHsBfj5HqCxMlz/sEniRaLreQ9Z738wo7E7sH6BPKKQ XhW5XRzFNqdvOQ==; Original-Received: from [87.69.77.57] (port=3969 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWerj-0003UH-8V; Fri, 09 Sep 2022 10:20:30 -0400 In-Reply-To: (message from Gerd =?utf-8?Q?M=C3=B6llmann?= on Fri, 9 Sep 2022 16:10:07 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:295070 Archived-At: > Date: Fri, 9 Sep 2022 16:10:07 +0200 > Cc: emacs-devel@gnu.org > From: Gerd Möllmann > > 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); } }