From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: simple patch for `etags.el' Date: Wed, 22 Sep 2004 10:08:50 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: <200409201650.26315.pogonyshev@gmx.net> <200409212200.22757.pogonyshev@gmx.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1095840615 20004 80.91.229.6 (22 Sep 2004 08:10:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Sep 2004 08:10:15 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 22 10:09:58 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CA2CM-0005zQ-00 for ; Wed, 22 Sep 2004 10:09:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CA2IJ-0002Yk-Vk for ged-emacs-devel@m.gmane.org; Wed, 22 Sep 2004 04:16:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CA2Hi-0002YW-Cu for emacs-devel@gnu.org; Wed, 22 Sep 2004 04:15:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CA2Hg-0002YK-3m for emacs-devel@gnu.org; Wed, 22 Sep 2004 04:15:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CA2Hf-0002YA-Lu for emacs-devel@gnu.org; Wed, 22 Sep 2004 04:15:27 -0400 Original-Received: from [212.88.64.25] (helo=mail-relay.sonofon.dk) by monty-python.gnu.org with smtp (Exim 4.34) id 1CA2BH-0004FR-3q for emacs-devel@gnu.org; Wed, 22 Sep 2004 04:08:51 -0400 Original-Received: (qmail 43175 invoked from network); 22 Sep 2004 08:08:50 -0000 Original-Received: from unknown (HELO kfs-l.imdomain.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 22 Sep 2004 08:08:50 -0000 Original-To: Paul Pogonyshev In-Reply-To: <200409212200.22757.pogonyshev@gmx.net> (Paul Pogonyshev's message of "Tue, 21 Sep 2004 22:04:06 -0200") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:27421 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:27421 Paul Pogonyshev writes: > Richard Stallman wrote: > >> Even better, how about not updating the percentage more than once >> per second? > > This turned out not to be better. Overhead caused by time > fetching and comparisons is not worth the gain. When > percentage is printed whenever it changes, `message' is > called at most 101 times and that is cheap. Note that 101 > is a constant, while the number of constraint evaluations > is practically not limited. You could do the time check only when you are about to call message, ie. a max of 101 times. > > So I suggest not bothering with time. It is faster, gives > much simpler code and, finally, once per second is still to > rarely, at least to my tastes. Probably -- but a default period of 0.2 seconds would be ok. -- Kim F. Storm http://www.cua.dk