From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.devel Subject: Re: Excessive redisplay from lots of process output Date: Fri, 24 Feb 2023 15:33:52 -0500 Message-ID: References: <834jrk1dli.fsf@gnu.org> <83fsaun9gx.fsf@gnu.org> <83a612n7dn.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19069"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, azeng@janestreet.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 24 21:52:07 2023 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 1pVf30-0004eM-Fb for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Feb 2023 21:52:06 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVf2P-0000yk-35; Fri, 24 Feb 2023 15:51:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVelb-0003TC-GZ for emacs-devel@gnu.org; Fri, 24 Feb 2023 15:34:07 -0500 Original-Received: from mxout1.mail.janestreet.com ([38.105.200.78]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVelZ-0007Yg-5h for emacs-devel@gnu.org; Fri, 24 Feb 2023 15:34:06 -0500 Original-Received: from mail-yw1-f199.google.com ([209.85.128.199]) by mxgoog2.mail.janestreet.com with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) (Exim 4.96) id 1pVelX-002Oa7-37 for emacs-devel@gnu.org; Fri, 24 Feb 2023 15:34:04 -0500 Original-Received: by mail-yw1-f199.google.com with SMTP id 00721157ae682-536bf649e70so8609997b3.0 for ; Fri, 24 Feb 2023 12:34:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=OeMVL7oKoZq6DIOayvhzpcC5Juz0nC1NtdLnwGeuAtk=; b=HyHWLKjx5CncE3XxN/lVKKxM7yXHKzXShIN/KOT9UQ3jCtNyXof6MAPT1aME+qEhUF /vQJ5EYHc5Vr8jHLYC/JYkvDg18rkqYSnGfHkSI6A4ztmw2xLq6v4Lli/HJ1cDHwdb7t T6n8+8AkZ3h9jCFtcGgEpUnVIU6NtSpeePRfg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OeMVL7oKoZq6DIOayvhzpcC5Juz0nC1NtdLnwGeuAtk=; b=qRxS9kk7MueDa7Mh8awYXz72Ul8MUTWfrg5lJjDX4d9HJnVN0gby6mF0s51zynQPB+ D+10SnBnzhjnL/OldMLsZifpaw83upHG3W4Pv8wrlBd7NEtPRQ+JEB+Va9Cwp4DhMfIV YVR5mpP26iFE9Q+KPkaZuFCPjcXk6ojd8vmqmpp0dx0q2fgEUdahS9xR+y9qDpm3y5HX vz1TZ/rI4dkb7H/qDIWB1gTMFg8x6ZfP3GmDk44xxfib87+pwakWldOtEkRm4FzNWVWl RX+USiXGE0BswUkdSYDVYnvoZUQJYlrsMpv8qn+A1ty3e9NBHHo1NpfZ+oP/0ud7iXJw +Mjg== X-Gm-Message-State: AO0yUKW6Pi/Voiz831DZoqFay9BqtG1YbN90RdDWqyZ9s+OI8NF93iVm tE+EJFQTJfXKUeNMENtM9r2slsrZjXL642kRiewU6YUDUzxDVoSh0PEE/Aqdc6bV9JOYPSe7F06 YkSt/R341B/Utw9G8jgOWbSKhvso= X-Received: by 2002:a05:6902:1203:b0:a09:314f:9f09 with SMTP id s3-20020a056902120300b00a09314f9f09mr794180ybu.6.1677270843750; Fri, 24 Feb 2023 12:34:03 -0800 (PST) X-Google-Smtp-Source: AK7set/8oW5KlVEm6Ply7FHBBrAKuJp/gyeKfuLWCTWQi9X8pW3OJobLPro2lYiHxAncMFhoR6e8qAVUgFfdFGTciLg= X-Received: by 2002:a05:6902:1203:b0:a09:314f:9f09 with SMTP id s3-20020a056902120300b00a09314f9f09mr794170ybu.6.1677270843522; Fri, 24 Feb 2023 12:34:03 -0800 (PST) In-Reply-To: <83a612n7dn.fsf@gnu.org> Received-SPF: pass client-ip=38.105.200.78; envelope-from=sbaugh@janestreet.com; helo=mxout1.mail.janestreet.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 24 Feb 2023 15:51:27 -0500 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303769 Archived-At: On Fri, Feb 24, 2023 at 3:19 PM Eli Zaretskii wrote: > > > From: Spencer Baugh > > Date: Fri, 24 Feb 2023 15:08:17 -0500 > > Cc: emacs-devel@gnu.org, > > azeng@janestreet.com > > > > > This is normal. > > > > Just to make sure I understand, you said earlier: > > > > >There are many variables and flags Emacs uses to decide when something > > >changed that needs the display to be updated. Those should generally > > >prevent Emacs from running the expensive parts of redisplay if they > > >are unnecessary. The question is why this doesn't work in your case. > > > > Are you saying this does not apply in the case of reading from > > process output? That after reading process output, we always do > > an expensive redisplay? > > Whether redisplay is expensive or not depends on many factors. But we > always flush the frame in that case, yes. Why? It seems unnecessary if nothing has changed. > > If so, it seems to me that this could be substantially improved. > > Why do we always do an expensive redisplay after reading process > > output, even if nothing has been changed to make it necessary? > > We don't always do an expensive redisplay, but we always call XFlush. > > > I would like to improve this so that my Emacs does not do > > expensive redisplay whenever it reads process output, which is > > substantially hurting performance for me when there's lots of > > process output to read. > > AFAIU, what is problematic for you is the X traffic causes by XFlush. I think that is problematic for anyone running with a slow X server; it gives the X server a lot to process. The fact that my X server is across the network just makes my X server seem artificially slow. In other words, I think XFlush should be considered "expensive" and avoided where possible.