From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Display slowness that is painful Date: Sun, 05 Feb 2006 01:16:06 +0100 Message-ID: References: <87slr5c78p.fsf@stupidchicken.com> <877j8fx43q.fsf@stupidchicken.com> <87mzhaqp7p.fsf@stupidchicken.com> <878xssm4oz.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1139109867 12101 80.91.229.2 (5 Feb 2006 03:24:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 5 Feb 2006 03:24:27 +0000 (UTC) Cc: cyd@stupidchicken.com, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 05 04:24:18 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F5aVX-00043x-La for ged-emacs-devel@m.gmane.org; Sun, 05 Feb 2006 04:24:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F5aYl-0002Iu-88 for ged-emacs-devel@m.gmane.org; Sat, 04 Feb 2006 22:27:31 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F5YCC-0006Gj-2O for emacs-devel@gnu.org; Sat, 04 Feb 2006 19:56:04 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F5Y3R-00046r-SO for emacs-devel@gnu.org; Sat, 04 Feb 2006 19:47:04 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F5Xdh-0007wC-Uz for emacs-devel@gnu.org; Sat, 04 Feb 2006 19:20:29 -0500 Original-Received: from [195.41.46.237] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1F5Xcw-0004wZ-35; Sat, 04 Feb 2006 19:19:38 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepc.post.tele.dk (Postfix) with SMTP id 8BA8E26282A; Sun, 5 Feb 2006 01:17:00 +0100 (CET) Original-To: Stefan Monnier In-Reply-To: <878xssm4oz.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 03 Feb 2006 18:01:52 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:50026 Archived-At: Stefan Monnier writes: >> Perhaps we should have some form of timer associated with the >> (default) redisplay-dont-pause == nil case, so that even if >> input_pending, we will still update the display if the last completed >> redisplay happened more than, say 2 seconds ago. > > We should probably do the usual "competitive analysis": keep track of the > amount of time thrown away because redisplay got interrupted, and when the > sum gets higher than the amount of time it would take to do a full > redisplay, then force a full redisplay. This sounds way too complex for my taste, and it doesn't give predictable results, i.e. you still don't really know when redisplay will/should actually complete. This is a matter of user perception ... if update takes too long to complete, emacs feels sloppy/slow. If we guarantee that redisplay will complete at least every 2 or 5 seconds, that is predictable behaviour. > > This way we can guarantee we're within a factor 2 of the optimal setting for > redisplay-dont-pause. > > > Stefan > > > PS: Of course, we maybe don't know how much time a full redisplay would take > and we probably don't want to keep track of actual time anyway, only some > estimate of "amount of work". I don't know how to do that. OTOH, I _do_ know how to compare time(&start_of_redisplay) and time(&now) when testing redisplay_dont_pause. -- Kim F. Storm http://www.cua.dk