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: Excessive redisplay from lots of process output Date: Fri, 24 Feb 2023 22:51:19 +0200 Message-ID: <834jran5x4.fsf@gnu.org> References: <834jrk1dli.fsf@gnu.org> <83fsaun9gx.fsf@gnu.org> <83a612n7dn.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17599"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, azeng@janestreet.com To: Spencer Baugh , Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Feb 24 21:51:55 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 1pVf2o-0004Jd-Sl for ged-emacs-devel@m.gmane-mx.org; Fri, 24 Feb 2023 21:51:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVf2I-0000xd-FI; Fri, 24 Feb 2023 15:51:22 -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 1pVf2G-0000wb-CL for emacs-devel@gnu.org; Fri, 24 Feb 2023 15:51:20 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVf2F-0005eZ-Hy; Fri, 24 Feb 2023 15:51:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=EJyRizfWMHApgOCcQwRHJL83EinsdjKAP1KTg3f+MGs=; b=PQev3TIkWZZw iIOC+DpL1JnB+telgDhpFBmx3edtDd33ki2m6DcFXego4ab0c1PGhSeDnYqZF8u15Gt/HsEIok64Z Dq4EW5E6RNEfaSgnCEFAFuE0q6937aqg9v3aQJ4z9UIWyvIKkWtfHQuL34hhvWQOWRCnT8f3+vlhe UqVWmGtSZ2EU4x5hIrNlYDiMjwm403v+wMg2rSfBQ8elSzuzZAIFgQzM/1r0i3wK7tLUKXH9DznVL q0WacuJYnIyWXABTGg31BOi8rWnqoNCd12bi6hEfp6ja+NxHfyBpYcQGDvJFsfjZLb/cCYMeDVl1R qffNc2YDFe3On7S27k2ljg==; Original-Received: from [87.69.77.57] (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 1pVf2E-00063S-Lh; Fri, 24 Feb 2023 15:51:19 -0500 In-Reply-To: (message from Spencer Baugh on Fri, 24 Feb 2023 15:33:52 -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:303768 Archived-At: > From: Spencer Baugh > Date: Fri, 24 Feb 2023 15:33:52 -0500 > Cc: emacs-devel@gnu.org, > azeng@janestreet.com > > 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. I'm not sure we know that nothing has changed. I'm also not sure I understand why XFlush is so expensive when nothing or almost nothing has changed on display. Maybe Po Lu could comment. > > 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. Are you sure? What exactly does XFlush send to the X server if nothing was changed on display? > In other words, I think XFlush should be considered "expensive" and > avoided where possible. If that is possible, I agree.