From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#58558: 29.0.50; re-search-forward is slow in some buffers Date: Tue, 13 Dec 2022 19:52:30 +0200 Message-ID: <83o7s7nqch.fsf@gnu.org> References: <877d10r21x.fsf@localhost> <87zgdwyvkt.fsf@gnus.org> <87ilkk6ri5.fsf@localhost> <87v8okjei9.fsf@gnus.org> <87tu44jdce.fsf@localhost> <87czasjd9j.fsf@gnus.org> <87k050nio5.fsf@localhost> <87zgdwhw0z.fsf@gnus.org> <83sfjo3tfw.fsf@gnu.org> <878rlfjmjh.fsf@localhost> <87mt9tbbbp.fsf@gnus.org> <8335bl18lo.fsf@gnu.org> <87wn8x9eqb.fsf@gnus.org> <87tu1zd2c6.fsf@localhost> <83h6xzphxm.fsf@gnu.org> <87wn6vbfaa.fsf@localhost> <838rjbpecw.fsf@gnu.org> <87fsdjwb4e.fsf@localhost> <83zgbrnv53.fsf@gnu.org> <87bko78aif.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23461"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58558@debbugs.gnu.org, larsi@gnus.org, monnier@iro.umontreal.ca To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 13 18:53:12 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p59Sp-0005tz-Hq for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Dec 2022 18:53:11 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p59Sm-00046O-M0; Tue, 13 Dec 2022 12:53:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p59Sg-00041Z-PL for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2022 12:53:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p59Sg-0007Aa-HB for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2022 12:53:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p59Sg-0000rS-Cn for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2022 12:53:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Dec 2022 17:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58558 X-GNU-PR-Package: emacs Original-Received: via spool by 58558-submit@debbugs.gnu.org id=B58558.16709539543301 (code B ref 58558); Tue, 13 Dec 2022 17:53:02 +0000 Original-Received: (at 58558) by debbugs.gnu.org; 13 Dec 2022 17:52:34 +0000 Original-Received: from localhost ([127.0.0.1]:33654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p59SE-0000rB-3v for submit@debbugs.gnu.org; Tue, 13 Dec 2022 12:52:34 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p59SC-0000r2-1R for 58558@debbugs.gnu.org; Tue, 13 Dec 2022 12:52:32 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p59S6-0006Nw-Fk; Tue, 13 Dec 2022 12:52:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=2DD9IS3LoWilYI3G5V4hpWKuRYYuWvIAg2wPB9J5Pu4=; b=jq02M56K/g35 TJuKosyYOnlbo8K0ot1/dOsla9x4cLzkdDTVml/ufug9dDLgwT/llsvFenFEsM3UtoqV8WYKvc3rz /BRtS1NmHedguAJK5FLs6Md+EwUdCB3dh9bmb2OBF+GOSAiq5hVnWe4PaXVCU1z0QXkCFQ7ewATNs tAHHgL3wqZOmNMufbKVKuCHtYuFI5hch6JMNHvu0JFGOU+W6BPVdVs5hx0/pcfZGVHfmrmT/o12I9 zeuGZuuZ2JnIqg6VuIpGhrW48pX6CNIZc5Gv1UDw5RE++7q/cu87bAemXZjRoXSvkNUdLjMuLjtuw 45rlb9QXaxw3GFfEccHmnQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p59S5-0003LX-W5; Tue, 13 Dec 2022 12:52:26 -0500 In-Reply-To: <87bko78aif.fsf@localhost> (message from Ihor Radchenko on Tue, 13 Dec 2022 17:43:36 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:250871 Archived-At: > From: Ihor Radchenko > Cc: larsi@gnus.org, monnier@iro.umontreal.ca, 58558@debbugs.gnu.org > Date: Tue, 13 Dec 2022 17:43:36 +0000 > > > If no other idea to find this out comes up, maybe run this with a > > breakpoint in make-marker, look at the backtrace to see the callers. > > I tried gdb now with break Fmake_marker. > > The benchmark itself does not trigger the breakpoint. > However, a huge number (hundreds) of breakpoint hits is generated upon > finishing the benchmark execution. > > bt: > > #0 Fmake_marker () at alloc.c:3736 > #1 0x00005555557bb750 in Fmatch_data (integers=0x0, reuse=0x0, reseat=0x0) at search.c:2903 Ha-ha, shooting ourselves in the foot! Great sleuthing job. Now we need to think what to do with this. Hmm... > If I read the backtrace correctly, something in my custom mode-line is > triggering Fmatch_data that creates markers. Yes, you have sone :eval form in the mode line, it seems? Calling xbacktrace will show a Lisp backtrace, which could be educational here. > But that code has not changes for years from git log. > > One suspicious thing is that my code gets called that much frequently > (100s of times) by redisplay. Not sure if it is normal. You cannot predict when redisplay decides to redraw the mode line.