From unknown Sun Jun 22 11:35:22 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#7069 <7069@debbugs.gnu.org> To: bug#7069 <7069@debbugs.gnu.org> Subject: Status: Compilation from within emacs becomes slower and slower until Emacs is restarted Reply-To: bug#7069 <7069@debbugs.gnu.org> Date: Sun, 22 Jun 2025 18:35:22 +0000 retitle 7069 Compilation from within emacs becomes slower and slower until = Emacs is restarted reassign 7069 emacs submitter 7069 Lars Hamren severity 7069 normal tag 7069 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 18 20:52:44 2010 Received: (at submit) by debbugs.gnu.org; 19 Sep 2010 00:52:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ox895-00054C-Hi for submit@debbugs.gnu.org; Sat, 18 Sep 2010 20:52:43 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ox818-00050s-Mf for submit@debbugs.gnu.org; Sat, 18 Sep 2010 20:44:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ox83T-0002M4-Hz for submit@debbugs.gnu.org; Sat, 18 Sep 2010 20:46:56 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:41671) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ox83T-0002M0-Fc for submit@debbugs.gnu.org; Sat, 18 Sep 2010 20:46:55 -0400 Received: from [140.186.70.92] (port=41664 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ox83S-0007XS-6E for bug-gnu-emacs@gnu.org; Sat, 18 Sep 2010 20:46:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ox83Q-0002Li-OC for bug-gnu-emacs@gnu.org; Sat, 18 Sep 2010 20:46:53 -0400 Received: from b-mail-1.teleservice.net ([85.30.129.51]:46688) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ox83Q-0002Kd-9Z for bug-gnu-emacs@gnu.org; Sat, 18 Sep 2010 20:46:52 -0400 Received: from b-mail-1.teleservice.net (localhost [127.0.0.1]) by b-mail-1.teleservice.net (Postfix) with ESMTP id E3DB022985 for ; Sun, 19 Sep 2010 02:38:00 +0200 (CEST) Received: from quad.sdu.se (host-85-30-164-27.sydskane.nu [85.30.164.27]) by b-mail-1.teleservice.net (Postfix) with ESMTP id 9CEC022982 for ; Sun, 19 Sep 2010 02:38:00 +0200 (CEST) Message-ID: <4C955B68.6000701@sdu.se> Date: Sun, 19 Sep 2010 02:38:00 +0200 From: Lars Hamren User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: Compilation from within emacs becomes slower and slower until Emacs is restarted Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-Virus-Scanned: ClamAV using ClamSMTP Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 18 Sep 2010 20:52:42 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.4 (-----) The first few compiles, using "compile" to invode GNU make, from within Emacs, run at "command-line speed" but then the overall time increases. The first 10 compiles are OK, but after about 20 compiles= , a compilation that "time make -k" reports as taking real 0m0.127s user 0m0.100s sys 0m0.016s takes more than five seconds. Then I give up and restart Emacs, and everything is fine for another 10 compiles. And so on. Here is some output from "strace emacs" socket(PF_FILE, SOCK_STREAM, 0) =3D 3 <0.000016> connect(3, {sa_family=3DAF_FILE, path=3D@"/tmp/.X11-unix/X0"}, 20) =3D 0= <0.000015> Here I attach strace to a running emacs just before i start compilation and detach as soon as the compilation is done. The first few selects are probably from before the time I press enter to execute the compile comman= d. select(4, [3], NULL, NULL, {0, 297904}) =3D 0 (Timeout) <0.298232> select(4, [3], NULL, NULL, {0, 498307}) =3D 0 (Timeout) <0.498832> select(4, [3], NULL, NULL, {0, 498294}) =3D 0 (Timeout) <0.498820> select(4, [3], NULL, NULL, {0, 498292}) =3D 0 (Timeout) <0.498818> select(4, [3], NULL, NULL, {0, 498250}) =3D 0 (Timeout) <0.498776> select(4, [3], NULL, NULL, {0, 498299}) =3D 1 (in [3], left {0, 444141})= <0.054181> select(4, [3], NULL, NULL, {0, 441524}) =3D 1 (in [3], left {0, 320780})= <0.120760> select(4, [3], NULL, NULL, {0, 312270}) =3D 1 (in [3], left {0, 311270})= <0.001084> select(4, [3], NULL, NULL, {0, 282200}) =3D 0 (Timeout) <0.282507> select(4, [3], NULL, NULL, {0, 498525}) =3D 1 (in [3], left {0, 21105}) = <0.477438> select(4, [3], NULL, NULL, {0, 499408}) =3D 0 (Timeout) <0.499936> select(4, [3], NULL, NULL, {0, 498927}) =3D 1 (in [3], left {0, 272045})= <0.226897> select(5, [3 4], NULL, NULL, {0, 499323}) =3D 1 (in [4], left {0, 479747= }) <0.019591> select(5, [3], NULL, NULL, {0, 20000}) =3D 0 (Timeout) <0.020070> select(5, [3 4], NULL, NULL, {0, 442695}) =3D 1 (in [4], left {0, 442690= }) <0.000016> select(5, [3], NULL, NULL, {0, 0}) =3D 0 (Timeout) <0.000008> select(4, [3], NULL, NULL, {0, 494042}) =3D 0 (Timeout) <0.494564> = <---- Much waiting here select(4, [3], NULL, NULL, {0, 498322}) =3D 0 (Timeout) <0.498847> select(4, [3], NULL, NULL, {0, 498336}) =3D 0 (Timeout) <0.498862> select(4, [3], NULL, NULL, {0, 498261}) =3D 0 (Timeout) <0.498784> select(4, [3], NULL, NULL, {0, 498320}) =3D 0 (Timeout) <0.498847> select(4, [3], NULL, NULL, {0, 498260}) =3D 0 (Timeout) <0.498786> select(4, [3], NULL, NULL, {0, 498325}) =3D 0 (Timeout) <0.498853> select(4, [3], NULL, NULL, {0, 498215}) =3D 0 (Timeout) <0.498737> select(4, [3], NULL, NULL, {0, 498057}) =3D 1 (in [3], left {0, 445670})= <0.052400> select(4, [3], NULL, NULL, {0, 445001}) =3D 1 (in [3], left {0, 349721})= <0.095295> select(4, [3], NULL, NULL, {0, 347501}) =3D 1 (in [3], left {0, 345858})= <0.001656> select(4, [3], NULL, NULL, {0, 345151}) =3D 1 (in [3], left {0, 342229})= <0.002978> select(4, [3], NULL, NULL, {0, 340611}) =3D 1 (in [3], left {0, 268540})= <0.072088> select(4, [3], NULL, NULL, {0, 259972}) =3D 1 (in [3], left {0, 259075})= <0.000975> select(4, [3], NULL, NULL, {0, 228314}) =3D 0 (Timeout) <0.228570> select(4, [3], NULL, NULL, {0, 498550} Environment Ubuntu 10.04 (and earlier, on 9.04) Linux: 2.6.32-24-generic Emacs 23.1.2 (my own emacs build) Emacs 22.2.1 (Ubuntu package) Googling, I can find nothing about this problem. /Lars ------------------------------------------------------------------- Lars Hamr=E9n Tel...: +46(46)189090 Svensk Datorutveckling e-post: hamren@sdu.se Vadm=F6llan 211 WWW...: www.sdu.se S-225 94 Lund Sweden From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 19 14:12:27 2010 Received: (at 7069) by debbugs.gnu.org; 19 Sep 2010 18:12:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OxONH-0004ji-CK for submit@debbugs.gnu.org; Sun, 19 Sep 2010 14:12:27 -0400 Received: from b-mail-1.teleservice.net ([85.30.129.51]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OxONF-0004jb-LK for 7069@debbugs.gnu.org; Sun, 19 Sep 2010 14:12:26 -0400 Received: from b-mail-1.teleservice.net (localhost [127.0.0.1]) by b-mail-1.teleservice.net (Postfix) with ESMTP id 80385228BF for <7069@debbugs.gnu.org>; Sun, 19 Sep 2010 20:14:52 +0200 (CEST) Received: from quad.sdu.se (host-85-30-164-27.sydskane.nu [85.30.164.27]) by b-mail-1.teleservice.net (Postfix) with ESMTP id 517C822866 for <7069@debbugs.gnu.org>; Sun, 19 Sep 2010 20:14:52 +0200 (CEST) Message-ID: <4C96531C.8070806@sdu.se> Date: Sun, 19 Sep 2010 20:14:52 +0200 From: Lars Hamren User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6 MIME-Version: 1.0 To: 7069@debbugs.gnu.org Subject: Problem only with "compile", not with "shell-command" Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-Virus-Scanned: ClamAV using ClamSMTP Content-Transfer-Encoding: quoted-printable X-Spam-Score: -4.5 (----) X-Debbugs-Envelope-To: 7069 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) If I try to run the same compilation with "shell-command", then there is no problem. The sub-process terminates quickly and the buffer is updated immediately. So, there does not seem to be a problem with sub-processes as such. /Lars Hamr=E9n From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 19 14:29:37 2010 Received: (at 7069) by debbugs.gnu.org; 19 Sep 2010 18:29:37 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OxOdt-0004qM-If for submit@debbugs.gnu.org; Sun, 19 Sep 2010 14:29:37 -0400 Received: from b-mail-1.teleservice.net ([85.30.129.51]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OxOds-0004qG-2N for 7069@debbugs.gnu.org; Sun, 19 Sep 2010 14:29:36 -0400 Received: from b-mail-1.teleservice.net (localhost [127.0.0.1]) by b-mail-1.teleservice.net (Postfix) with ESMTP id DE0332299E for <7069@debbugs.gnu.org>; Sun, 19 Sep 2010 20:32:02 +0200 (CEST) Received: from quad.sdu.se (host-85-30-164-27.sydskane.nu [85.30.164.27]) by b-mail-1.teleservice.net (Postfix) with ESMTP id BA71222997 for <7069@debbugs.gnu.org>; Sun, 19 Sep 2010 20:32:02 +0200 (CEST) Message-ID: <4C965722.2010909@sdu.se> Date: Sun, 19 Sep 2010 20:32:02 +0200 From: Lars Hamren User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6 MIME-Version: 1.0 To: 7069@debbugs.gnu.org Subject: Clarification Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-Virus-Scanned: ClamAV using ClamSMTP Content-Transfer-Encoding: quoted-printable X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: 7069 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.0 (----) The problem, as far as I can determine, is not that the compilation process takes longer, but that buffer/window update is slow. For long compilations, with output more than a few kB, output is "chunky". Updates seem to be in multiples of 4 kB, with delays between them. Running strace supports this assumption. I tried this as a "compilation": time find /path/to/somewhere -ls With "compile" (slow, chunky buffer update) real 0m30.488s user 0m0.032s sys 0m0.036s With "shell-command" (immediate buffer update) real 0m0.027s user 0m0.020s sys 0m0.008s From Bash, not within emacs real 0m0.028s user 0m0.016s sys 0m0.012s User and system times are effectively the same, but real time differs by a factor of 1000. /Lars Hamr=E9n From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 22 02:41:23 2010 Received: (at 7069) by debbugs.gnu.org; 22 Sep 2010 06:41:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyJ18-0006Jv-7g for submit@debbugs.gnu.org; Wed, 22 Sep 2010 02:41:22 -0400 Received: from smtprelay-b11.telenor.se ([62.127.194.20]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OyJ14-0006Jq-RQ for 7069@debbugs.gnu.org; Wed, 22 Sep 2010 02:41:20 -0400 Received: from ipb4.telenor.se (ipb4.telenor.se [195.54.127.167]) by smtprelay-b11.telenor.se (Postfix) with ESMTP id 7E007E94FB for <7069@debbugs.gnu.org>; Wed, 22 Sep 2010 08:43:52 +0200 (CEST) X-SENDER-IP: [85.225.45.35] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ars7AFNCmUxV4S0jPGdsb2JhbACHbZo9DAEBAQE1LcNthUEEjTY X-IronPort-AV: E=Sophos;i="4.56,404,1280700000"; d="scan'208";a="1673785751" Received: from c-232de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.35]) by ipb4.telenor.se with ESMTP; 22 Sep 2010 08:43:52 +0200 Received: from [172.20.199.2] (gaffa [172.20.199.2]) by coolsville.localdomain (Postfix) with ESMTP id 752767FA05A; Wed, 22 Sep 2010 08:43:51 +0200 (CEST) Message-ID: <4C99A5A6.8090004@swipnet.se> Date: Wed, 22 Sep 2010 08:43:50 +0200 From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8 MIME-Version: 1.0 To: Lars Hamren Subject: Re: bug#7069: Compilation from within emacs becomes slower and slower until Emacs is restarted References: <4C955B68.6000701@sdu.se> In-Reply-To: <4C955B68.6000701@sdu.se> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 7069 Cc: 7069@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.4 (-) I can't repeat this. The "Much waiting here" you mark below is Emacs wai= ting=20 for your X server to send something, so it doesn't say anything. As there is only one fd in the select, the compilation must have finished= =20 before this. For an strace to be useful, you need to see what emacs reads from the=20 compilation and when and compare this to the "real" output. If there is = a=20 notable delay for when Emacs reads from the compilation process, there mi= ght=20 be a problem. For now it just looks like your X server has some bug or i= s=20 busy doing something else, so it doesn't have time to update Emacs window= s. You also failed to say if this happens with emacs -Q. Is Emacs stuck whe= n=20 this happens or can you edit in other buffers? Please use M-x report-emacs-bug next time to include relevant information= =20 about your Emacs. Jan D. 2010-09-19 02:38, Lars Hamren skrev: > The first few compiles, using "compile" to invode GNU make, > from within Emacs, run at "command-line speed" but then the overall > time increases. The first 10 compiles are OK, but after about 20 compil= es, > a compilation that "time make -k" reports as taking > > real 0m0.127s > user 0m0.100s > sys 0m0.016s > > takes more than five seconds. Then I give up and restart Emacs, and > everything is fine for another 10 compiles. And so on. > > Here is some output from "strace emacs" > > socket(PF_FILE, SOCK_STREAM, 0) =3D 3 <0.000016> > connect(3, {sa_family=3DAF_FILE, path=3D@"/tmp/.X11-unix/X0"}, 20) =3D = 0 > <0.000015> > > Here I attach strace to a running emacs just before i start compilation > and detach as soon as the compilation is done. The first few selects ar= e > probably from before the time I press enter to execute the compile comm= and. > > select(4, [3], NULL, NULL, {0, 297904}) =3D 0 (Timeout) <0.298232> > select(4, [3], NULL, NULL, {0, 498307}) =3D 0 (Timeout) <0.498832> > select(4, [3], NULL, NULL, {0, 498294}) =3D 0 (Timeout) <0.498820> > select(4, [3], NULL, NULL, {0, 498292}) =3D 0 (Timeout) <0.498818> > select(4, [3], NULL, NULL, {0, 498250}) =3D 0 (Timeout) <0.498776> > select(4, [3], NULL, NULL, {0, 498299}) =3D 1 (in [3], left {0, 444141}= ) > <0.054181> > select(4, [3], NULL, NULL, {0, 441524}) =3D 1 (in [3], left {0, 320780}= ) > <0.120760> > select(4, [3], NULL, NULL, {0, 312270}) =3D 1 (in [3], left {0, 311270}= ) > <0.001084> > select(4, [3], NULL, NULL, {0, 282200}) =3D 0 (Timeout) <0.282507> > select(4, [3], NULL, NULL, {0, 498525}) =3D 1 (in [3], left {0, 21105}) > <0.477438> > select(4, [3], NULL, NULL, {0, 499408}) =3D 0 (Timeout) <0.499936> > select(4, [3], NULL, NULL, {0, 498927}) =3D 1 (in [3], left {0, 272045}= ) > <0.226897> > select(5, [3 4], NULL, NULL, {0, 499323}) =3D 1 (in [4], left {0, 47974= 7}) > <0.019591> > select(5, [3], NULL, NULL, {0, 20000}) =3D 0 (Timeout) <0.020070> > select(5, [3 4], NULL, NULL, {0, 442695}) =3D 1 (in [4], left {0, 44269= 0}) > <0.000016> > select(5, [3], NULL, NULL, {0, 0}) =3D 0 (Timeout) <0.000008> > select(4, [3], NULL, NULL, {0, 494042}) =3D 0 (Timeout) <0.494564> <---= - > Much waiting here > select(4, [3], NULL, NULL, {0, 498322}) =3D 0 (Timeout) <0.498847> > select(4, [3], NULL, NULL, {0, 498336}) =3D 0 (Timeout) <0.498862> > select(4, [3], NULL, NULL, {0, 498261}) =3D 0 (Timeout) <0.498784> > select(4, [3], NULL, NULL, {0, 498320}) =3D 0 (Timeout) <0.498847> > select(4, [3], NULL, NULL, {0, 498260}) =3D 0 (Timeout) <0.498786> > select(4, [3], NULL, NULL, {0, 498325}) =3D 0 (Timeout) <0.498853> > select(4, [3], NULL, NULL, {0, 498215}) =3D 0 (Timeout) <0.498737> > select(4, [3], NULL, NULL, {0, 498057}) =3D 1 (in [3], left {0, 445670}= ) > <0.052400> > select(4, [3], NULL, NULL, {0, 445001}) =3D 1 (in [3], left {0, 349721}= ) > <0.095295> > select(4, [3], NULL, NULL, {0, 347501}) =3D 1 (in [3], left {0, 345858}= ) > <0.001656> > select(4, [3], NULL, NULL, {0, 345151}) =3D 1 (in [3], left {0, 342229}= ) > <0.002978> > select(4, [3], NULL, NULL, {0, 340611}) =3D 1 (in [3], left {0, 268540}= ) > <0.072088> > select(4, [3], NULL, NULL, {0, 259972}) =3D 1 (in [3], left {0, 259075}= ) > <0.000975> > select(4, [3], NULL, NULL, {0, 228314}) =3D 0 (Timeout) <0.228570> > select(4, [3], NULL, NULL, {0, 498550} > > Environment > > Ubuntu 10.04 (and earlier, on 9.04) > Linux: 2.6.32-24-generic > Emacs 23.1.2 (my own emacs build) > Emacs 22.2.1 (Ubuntu package) > > Googling, I can find nothing about this problem. > > /Lars > ------------------------------------------------------------------- > Lars Hamr=E9n Tel...: +46(46)189090 > Svensk Datorutveckling e-post: hamren@sdu.se > Vadm=F6llan 211 WWW...: www.sdu.se > S-225 94 Lund > Sweden > > From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 27 22:38:38 2010 Received: (at 7069) by debbugs.gnu.org; 28 Oct 2010 02:38:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PBINy-0002Ni-3Z for submit@debbugs.gnu.org; Wed, 27 Oct 2010 22:38:38 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PBINw-0002Na-G0; Wed, 27 Oct 2010 22:38:36 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgQJABSAyExFxL/T/2dsb2JhbACgSHxywDuFSASSKg X-IronPort-AV: E=Sophos;i="4.58,248,1286164800"; d="scan'208";a="80873382" Received: from 69-196-191-211.dsl.teksavvy.com (HELO pastel.home) ([69.196.191.211]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 27 Oct 2010 22:42:44 -0400 Received: by pastel.home (Postfix, from userid 20848) id 2BFC0A8558; Wed, 27 Oct 2010 22:42:44 -0400 (EDT) From: Stefan Monnier To: Lars Hamren Subject: Re: bug#7069: Compilation from within emacs becomes slower and slower until Emacs is restarted Message-ID: References: <4C955B68.6000701@sdu.se> Date: Wed, 27 Oct 2010 22:42:44 -0400 In-Reply-To: <4C955B68.6000701@sdu.se> (Lars Hamren's message of "Sun, 19 Sep 2010 02:38:00 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 7069 Cc: 7069@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) severity 7069 important thanks > The first few compiles, using "compile" to invode GNU make, > from within Emacs, run at "command-line speed" but then the overall > time increases. The first 10 compiles are OK, but after about 20 compiles, > a compilation that "time make -k" reports as taking Thanks for the report. This looks like a serious problem. I don't have time to look into it right now, but just letting you know that your plea hasn't fallen down /dev/null. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 20 06:04:50 2011 Received: (at 7069) by debbugs.gnu.org; 20 Apr 2011 10:04:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCUHC-0005K0-Ci for submit@debbugs.gnu.org; Wed, 20 Apr 2011 06:04:50 -0400 Received: from b-mail-1.teleservice.net ([85.30.129.51]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCUHA-0005Jn-4y for 7069@debbugs.gnu.org; Wed, 20 Apr 2011 06:04:49 -0400 Received: from b-mail-1.teleservice.net (localhost [127.0.0.1]) by b-mail-1.teleservice.net (Postfix) with ESMTP id BC55022D5C; Wed, 20 Apr 2011 12:04:41 +0200 (CEST) Received: from quad.sdu.se (host-85-30-164-27.sydskane.nu [85.30.164.27]) by b-mail-1.teleservice.net (Postfix) with ESMTP id 82B5C22D55; Wed, 20 Apr 2011 12:04:41 +0200 (CEST) Message-ID: <4DAEAFB9.8090900@sdu.se> Date: Wed, 20 Apr 2011 12:04:41 +0200 From: Lars Hamren User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: 7069@debbugs.gnu.org, Stefan Monnier , =?ISO-8859-1?Q?Jan_Dj=E4rv?= Subject: Re: Compilation from within emacs becomes slower and slower until Emacs is restarted Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-Virus-Scanned: ClamAV using ClamSMTP Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.9 (---) X-Debbugs-Envelope-To: 7069 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.9 (---) Hi, I have found the cause of this problem. It goes away if I remove this code from my .emacs: (add-hook 'compilation-mode-hook (lambda () (setq compilation-error-regexp-alist (cons ;; Quartus II error messages '(".*Verilog .* at \\(.+\\)(\\([0-9]+\\)): .*" 1 2) compilation-error-regexp-alist)))) I haven't looked further into why this should be a problem. The regexp is quite simple, and doesn't match when compiling with g++. Kind regards /Lars ------------------------------------------------------------------- Lars Hamr=E9n WWW...: www.sdu.se Svensk Datorutveckling Email.: hamren@sdu.se Vadm=F6llan 211 Tel...: +46( 46)189090 S-225 94 Lund Mobile: +46(705)189090 Sweden From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 20 09:10:41 2011 Received: (at 7069) by debbugs.gnu.org; 20 Apr 2011 13:10:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCXB2-0001nc-Rf for submit@debbugs.gnu.org; Wed, 20 Apr 2011 09:10:41 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QCXB1-0001nS-66 for 7069@debbugs.gnu.org; Wed, 20 Apr 2011 09:10:39 -0400 Received: from 213-159-126-200.fibertel.com.ar ([200.126.159.213]:50450 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QCXAu-0004ST-P0; Wed, 20 Apr 2011 09:10:33 -0400 Received: by ceviche.home (Postfix, from userid 20848) id D55A0662B5; Wed, 20 Apr 2011 10:10:30 -0300 (ART) From: Stefan Monnier To: Lars Hamren Subject: Re: Compilation from within emacs becomes slower and slower until Emacs is restarted Message-ID: References: <4DAEAFB9.8090900@sdu.se> Date: Wed, 20 Apr 2011 10:10:30 -0300 In-Reply-To: <4DAEAFB9.8090900@sdu.se> (Lars Hamren's message of "Wed, 20 Apr 2011 12:04:41 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 7069 Cc: Jan =?iso-8859-1?Q?Dj=E4rv?= , 7069@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) > (add-hook 'compilation-mode-hook > (lambda () (setq compilation-error-regexp-alist > (cons > ;; Quartus II error messages > '(".*Verilog .* at \\(.+\\)(\\([0-9]+\\)): .*" 1 2) > compilation-error-regexp-alist)))) There are various optimizations you can do on this regexp (such as remove the trailing ".*"), but the only one I can see that should make a significant difference in terms of performance is the leading ".*". I.e. remove the ".*" at the beginning (compilation regexps are not anchored at the BOL since Emacs-22, IIRC). This should speed things up significantly. If you insist on keeping the ".*" because you like the resulting highlighting, then add a "^" before it. > I haven't looked further into why this should be a problem. I can't think of any reason why this regexp should make compilation become slower (I can see why it would make it slow, but unless lines become longer over time, it should keep the same slowness at the end as it had at the beginning). Then again, this may depend on the version of Emacs you're using. I've made some changes to the way compilation messages are parsed in the upcoming Emacs-24 code (not specifically for performance reasons, but it does impact performance), so if you could try out the development code that would be helpful: I'd like to resolve such performance bugs before Emacs-24 is released. > The regexp is quite simple, and doesn't match when compiling with g++. Depending on the shape of the regexp, the "doesn't match" case can be the worst case, because the regexp-matcher has to try *all* the possible ways in which it might match before reporting a match failure, whereas a successful match would stop as soon as the first way to match is found. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 24 21:17:26 2011 Received: (at submit) by debbugs.gnu.org; 25 Apr 2011 01:17:26 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QEAQX-0006tA-Ud for submit@debbugs.gnu.org; Sun, 24 Apr 2011 21:17:26 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QEAQV-0006sz-Fq for submit@debbugs.gnu.org; Sun, 24 Apr 2011 21:17:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QEAQP-0000aL-5S for submit@debbugs.gnu.org; Sun, 24 Apr 2011 21:17:18 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_RP_MATCHES_RCVD, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:39424) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEAQP-0000aH-4B for submit@debbugs.gnu.org; Sun, 24 Apr 2011 21:17:17 -0400 Received: from eggs.gnu.org ([140.186.70.92]:51774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEAQO-0000sT-89 for bug-gnu-emacs@gnu.org; Sun, 24 Apr 2011 21:17:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QEAQN-0000Zs-CD for bug-gnu-emacs@gnu.org; Sun, 24 Apr 2011 21:17:16 -0400 Received: from lo.gmane.org ([80.91.229.12]:55562) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEAQN-0000Zn-66 for bug-gnu-emacs@gnu.org; Sun, 24 Apr 2011 21:17:15 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QEAQJ-0006mu-GL for bug-gnu-emacs@gnu.org; Mon, 25 Apr 2011 03:17:11 +0200 Received: from c-67-183-23-114.hsd1.wa.comcast.net ([67.183.23.114]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Apr 2011 03:17:11 +0200 Received: from dan.colascione by c-67-183-23-114.hsd1.wa.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Apr 2011 03:17:11 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Daniel Colascione Subject: Re: bug#7069: Compilation from within emacs becomes slower and slower until Emacs is restarted Date: Sun, 24 Apr 2011 18:16:58 -0700 Lines: 30 Message-ID: <4DB4CB8A.80607@gmail.com> References: <4DAEAFB9.8090900@sdu.se> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-67-183-23-114.hsd1.wa.comcast.net User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 In-Reply-To: X-Enigmail-Version: 1.1.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.4 (-----) X-Debbugs-Envelope-To: submit Cc: Lars Hamren , 7069@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.4 (-----) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 4/20/11 6:10 AM, Stefan Monnier wrote: >> (add-hook 'compilation-mode-hook >> (lambda () (setq compilation-error-regexp-alist >> (cons >> ;; Quartus II error messages >> '(".*Verilog .* at \\(.+\\)(\\([0-9]+\\)): .*" 1 2) >> compilation-error-regexp-alist)))) [snip] >> I haven't looked further into why this should be a problem. > > I can't think of any reason why this regexp should make compilation > become slower (I can see why it would make it slow, but unless lines > become longer over time, it should keep the same slowness at the end as > it had at the beginning). He's adding an entry to compilation-error-regexp-alist every time he compiles, and this variable is not buffer local. After the 20th compilation, Emacs tries 20 times harder to match this regular expression. He should be using add-to-list or (pushnew mumble :test #'equal). -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) iEYEARECAAYFAk20y4YACgkQ17c2LVA10VsQ0wCg3bzMD1o0IRivJBy4re3yofcv K/MAniiaVMysZW/7RGG1QS1E9RAIxNT5 =C03A -----END PGP SIGNATURE----- From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 25 08:28:31 2011 Received: (at 7069) by debbugs.gnu.org; 25 Apr 2011 12:28:31 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QEKtz-0005bR-5c for submit@debbugs.gnu.org; Mon, 25 Apr 2011 08:28:31 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QEKtw-0005bG-Nc for 7069@debbugs.gnu.org; Mon, 25 Apr 2011 08:28:29 -0400 Received: from 121-249-126-200.fibertel.com.ar ([200.126.249.121]:34366 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QEKtq-0001oX-JH; Mon, 25 Apr 2011 08:28:22 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 95BD86618A; Mon, 25 Apr 2011 09:28:18 -0300 (ART) From: Stefan Monnier To: Daniel Colascione Subject: Re: bug#7069: Compilation from within emacs becomes slower and slower until Emacs is restarted Message-ID: References: <4DAEAFB9.8090900@sdu.se> <4DB4CB8A.80607@gmail.com> Date: Mon, 25 Apr 2011 09:28:18 -0300 In-Reply-To: <4DB4CB8A.80607@gmail.com> (Daniel Colascione's message of "Sun, 24 Apr 2011 18:16:58 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 7069 Cc: Lars Hamren , 7069@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) >>> (add-hook 'compilation-mode-hook >>> (lambda () (setq compilation-error-regexp-alist >>> (cons >>> ;; Quartus II error messages >>> '(".*Verilog .* at \\(.+\\)(\\([0-9]+\\)): .*" 1 2) >>> compilation-error-regexp-alist)))) > [snip] >>> I haven't looked further into why this should be a problem. >> >> I can't think of any reason why this regexp should make compilation >> become slower (I can see why it would make it slow, but unless lines >> become longer over time, it should keep the same slowness at the end as >> it had at the beginning). > He's adding an entry to compilation-error-regexp-alist every time he > compiles, Duh, good catch, thank you, Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 25 09:05:15 2011 Received: (at 7069) by debbugs.gnu.org; 25 Apr 2011 13:05:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QELTX-0006Q2-6d for submit@debbugs.gnu.org; Mon, 25 Apr 2011 09:05:15 -0400 Received: from b-mail-1.teleservice.net ([85.30.129.51]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QELTU-0006Pn-Qm for 7069@debbugs.gnu.org; Mon, 25 Apr 2011 09:05:13 -0400 Received: from b-mail-1.teleservice.net (localhost [127.0.0.1]) by b-mail-1.teleservice.net (Postfix) with ESMTP id 5DE9E228AF; Mon, 25 Apr 2011 15:05:06 +0200 (CEST) Received: from quad.sdu.se (host-85-30-164-27.sydskane.nu [85.30.164.27]) by b-mail-1.teleservice.net (Postfix) with ESMTP id 3129A22884; Mon, 25 Apr 2011 15:05:06 +0200 (CEST) Message-ID: <4DB57181.60009@sdu.se> Date: Mon, 25 Apr 2011 15:05:05 +0200 From: Lars Hamren User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#7069: Compilation from within emacs becomes slower and slower until Emacs is restarted References: <4DAEAFB9.8090900@sdu.se> <4DB4CB8A.80607@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-Virus-Scanned: ClamAV using ClamSMTP Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: 7069 Cc: 7069@debbugs.gnu.org, Daniel Colascione X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.8 (---) On 04/25/11 14:28, Stefan Monnier wrote: >> He's adding an entry to compilation-error-regexp-alist every time he >> > compiles, > Duh, good catch, thank you, Second that. Sorry to have wasted everybody's time :-( Kind regards /Lars ------------------------------------------------------------------- Lars Hamr=E9n WWW...: www.sdu.se Svensk Datorutveckling Email.: hamren@sdu.se Vadm=F6llan 211 Tel...: +46( 46)189090 S-225 94 Lund Mobile: +46(705)189090 Sweden From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 25 13:14:13 2011 Received: (at control) by debbugs.gnu.org; 25 Apr 2011 17:14:13 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QEPMS-0003h1-Mm for submit@debbugs.gnu.org; Mon, 25 Apr 2011 13:14:12 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QEPMQ-0003gm-MY for control@debbugs.gnu.org; Mon, 25 Apr 2011 13:14:11 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1QEPML-000308-D8 for control@debbugs.gnu.org; Mon, 25 Apr 2011 13:14:05 -0400 Date: Mon, 25 Apr 2011 13:14:05 -0400 Message-Id: Subject: control message for bug 7069 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) close 7069 From unknown Sun Jun 22 11:35:22 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 24 May 2011 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator