From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: RMAIL slows Date: Tue, 12 Apr 2005 23:45:34 +0200 Message-ID: <85u0mb8y9t.fsf@gnu.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1113342409 2461 80.91.229.2 (12 Apr 2005 21:46:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Apr 2005 21:46:49 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 12 23:46:46 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DLTDL-0003tJ-37 for ged-emacs-devel@m.gmane.org; Tue, 12 Apr 2005 23:46:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DLSni-00006J-A1 for ged-emacs-devel@m.gmane.org; Tue, 12 Apr 2005 17:20:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DLSjv-0004So-0x for emacs-devel@gnu.org; Tue, 12 Apr 2005 17:16:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DLSju-0004S9-4k for emacs-devel@gnu.org; Tue, 12 Apr 2005 17:16:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DLSju-0004Re-14 for emacs-devel@gnu.org; Tue, 12 Apr 2005 17:16:06 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DLTCg-000281-JW for emacs-devel@gnu.org; Tue, 12 Apr 2005 17:45:50 -0400 Original-Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by fencepost.gnu.org with esmtp (Exim 4.34) id 1DLTCP-0000rN-4l; Tue, 12 Apr 2005 17:45:33 -0400 Original-To: bob@rattlesnake.com In-Reply-To: (Robert J. Chassell's message of "Tue, 12 Apr 2005 13:49:23 -0400 (EDT)") 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:35912 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35912 "Robert J. Chassell" writes: > Stefan Monnier wrote, > > ... re_match_2_internal is a function that can easily take an > insane amount of time ... > > So a good thing to do is to look at the regexp that's being matched > (typically: look up the backtrace to see the value of the `string' argument > to search_buffer, then do "print string" and then "xstring" to see the > actual string). > > Thank you. This and Kim's message are what I need. I cannot figure > out why things go wrong. They look OK to me. > > ... let the code run until the end of re_match_2_internal. If > it's immediate it means the problem is maybe not in the time taken > in each call to re_match_2_internal, but rather in the number of > calls. > > When I evoke `finish' when the program has stopped at > re_match_2_internal, it runs fairly quickly to then stop in > re_search_2 in regex.c, line 4338, at the second line of > > if (val >= 0) > return startpos; > > even though I do not have a break point there. (The only breakpoint > for this run is in re_match_2_internal at regex.c:4828) Please compile Emacs with "-fnocrossjumping" in the CFLAGS options. If you don't, GCC will merge multiple execution paths, making debugging returns, assertions and other stuff quite impossible. Stack traces will tend to be occasionally rubbish, too. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum