From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dave Abrahams Newsgroups: gmane.emacs.bugs Subject: bug#8890: 23.3; message writing slows emacs Date: Fri, 16 Sep 2011 11:11:56 -0400 Message-ID: References: <83ehzgvbwj.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1316185949 5343 80.91.229.12 (16 Sep 2011 15:12:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 16 Sep 2011 15:12:29 +0000 (UTC) Cc: 8890@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 16 17:12:23 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R4a5W-0004ts-Et for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Sep 2011 17:12:22 +0200 Original-Received: from localhost ([::1]:58050 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4a5V-0007fv-SH for geb-bug-gnu-emacs@m.gmane.org; Fri, 16 Sep 2011 11:12:21 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:59252) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4a5S-0007fi-E3 for bug-gnu-emacs@gnu.org; Fri, 16 Sep 2011 11:12:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R4a5R-00007L-5H for bug-gnu-emacs@gnu.org; Fri, 16 Sep 2011 11:12:18 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40612) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R4a5R-00007F-2J for bug-gnu-emacs@gnu.org; Fri, 16 Sep 2011 11:12:17 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R4aA1-0003qc-FS; Fri, 16 Sep 2011 11:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dave Abrahams Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Sep 2011 15:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8890 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8890-submit@debbugs.gnu.org id=B8890.131618620614767 (code B ref 8890); Fri, 16 Sep 2011 15:17:01 +0000 Original-Received: (at 8890) by debbugs.gnu.org; 16 Sep 2011 15:16:46 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R4a9l-0003q7-N6 for submit@debbugs.gnu.org; Fri, 16 Sep 2011 11:16:46 -0400 Original-Received: from mail-qy0-f172.google.com ([209.85.216.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R4a9j-0003q0-Ex for 8890@debbugs.gnu.org; Fri, 16 Sep 2011 11:16:44 -0400 Original-Received: by qyk32 with SMTP id 32so481623qyk.3 for <8890@debbugs.gnu.org>; Fri, 16 Sep 2011 08:11:58 -0700 (PDT) Original-Received: by 10.224.210.67 with SMTP id gj3mr2221609qab.82.1316185918746; Fri, 16 Sep 2011 08:11:58 -0700 (PDT) Original-Received: from pluto.luannocracy.com (207-172-223-249.c3-0.smr-ubr3.sbo-smr.ma.static.cable.rcn.com. [207.172.223.249]) by mx.google.com with ESMTPS id du5sm3279705qab.14.2011.09.16.08.11.57 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 16 Sep 2011 08:11:57 -0700 (PDT) Original-Received: by pluto.luannocracy.com (Postfix, from userid 501) id DD969F227F8; Fri, 16 Sep 2011 11:11:56 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Fri, 16 Sep 2011 10:20:05 -0400") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.3 (darwin) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 16 Sep 2011 11:17:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:51226 Archived-At: on Fri Sep 16 2011, Stefan Monnier wrote: >>> "A few milliseconds" sounds negligible, but if it's done at every > >>> iteration of a loop whose body takes less than a millisecond to run >>> (we can do a lot of work in a millisecond on today's machines), then >>> it's a major slowdown. >> Then programmers who run those loops should update the progress less >> aggressively. Redisplay (and infrastructure in general) lack the >> context that would allow them to make good decisions as to when defer >> repeated display. Only the calling application can know that. > > Indeed. The main problem with changing `message' is that if it is > called too soon after the previous `message' we can't easily say "don't > display this one" since there may not be any subsequent message coming, > so we'd have to stash the last undisplayed message and then try and > figure out good places/times to cause them to be displayed. Well, the `obvious' good place/time is at next idle if no further messages have come along to stomp on the previous one. > So the general approach to fixing those problems is to say "use > progress-reporter-update" since this function has the advantage of > knowing that there will be a `progress-reporter-done' at some later > point, which allows it to skip a message without worries. Hm. So there *is* a builtin functionality for this... well, that's good. Sorry if I've wasted everyone's time on this. -- Dave Abrahams BoostPro Computing http://www.boostpro.com