From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#58558: 29.0.50; re-search-forward is slow in some buffers Date: Tue, 13 Dec 2022 17:43:36 +0000 Message-ID: <87bko78aif.fsf@localhost> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16840"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58558@debbugs.gnu.org, larsi@gnus.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 13 18:44:14 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 1p59KA-0004Bk-3q for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Dec 2022 18:44:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p59K3-0000Vv-8s; Tue, 13 Dec 2022 12:44:07 -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 1p59Jy-0000VM-8h for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2022 12:44:02 -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 1p59Jy-0002O0-0H for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2022 12:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p59Jx-0006rC-SG for bug-gnu-emacs@gnu.org; Tue, 13 Dec 2022 12:44:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Dec 2022 17:44:01 +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.167095343126345 (code B ref 58558); Tue, 13 Dec 2022 17:44:01 +0000 Original-Received: (at 58558) by debbugs.gnu.org; 13 Dec 2022 17:43:51 +0000 Original-Received: from localhost ([127.0.0.1]:33589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p59Jm-0006qr-QB for submit@debbugs.gnu.org; Tue, 13 Dec 2022 12:43:51 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:50049) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p59Jk-0006ql-Op for 58558@debbugs.gnu.org; Tue, 13 Dec 2022 12:43:49 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 409C724002A for <58558@debbugs.gnu.org>; Tue, 13 Dec 2022 18:43:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1670953423; bh=JN4FACcjNLquCT1Ou+uKnj69OgFB2sUXuWaQYMzaJEo=; h=From:To:Cc:Subject:Date:From; b=QtMpGfymR3Wu8JHxA0fIfr5f9RpiRssNatXaxqCCbr3p8bFCDtGCDXi3M+Q+Gwv/w qb+IOBGC4/pesixjLnHPBbktTWiv8OAktHiVWanXj+gznu8ObcvsAyZHcOvMgrk4Cs QaVqHNuAJUZtCfJcm3eKTMyX8ydByszZNqZB1D6pENZ1JNQx7ZEZZlem/U3TLO/BRn 0VWYZLz88oVk+mjDR4XCMw4B9HWW7XbhdAI7/1NMiks+E4m78dHyhsC3J02kYI3+ax LESuqQAqSSfP6B7+SQhw6fGN2/REHEEmoCPr02+9TnkS3hPzfwngjyojPUCz38J0iu fSSi9zUMC6+7g== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NWm7f0kySz9rxY; Tue, 13 Dec 2022 18:43:41 +0100 (CET) In-Reply-To: <83zgbrnv53.fsf@gnu.org> 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:250867 Archived-At: Eli Zaretskii writes: >> My guess: number of markers is growing somehow? > > That was my guess, yeah. > > So now the question becomes: who creates all those additional markers > if all you do is run the benchmark? > > 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 #2 0x000055555580eb6d in funcall_subr (subr=0x555555e0dc20 , numargs=0, args=0x7ffff0c02070) at eval.c:3038 #3 0x00005555558634c1 in exec_byte_code (fun=0x555557370195, args_template=0, nargs=0, args=0x0) at bytecode.c:809 #4 0x000055555580ee6b in fetch_and_exec_byte_code (fun=0x555557370195, args_template=0, nargs=0, args=0x0) at eval.c:3081 #5 0x000055555580f5a8 in funcall_lambda (fun=0x555557370195, nargs=1, arg_vector=0x7ffff0c02038) at eval.c:3242 #6 0x000055555580e688 in funcall_general (fun=0x555557370195, numargs=1, args=0x7ffff0c02038) at eval.c:2945 #7 0x00005555558634e1 in exec_byte_code (fun=0x55555734c7cd, args_template=0, nargs=0, args=0x0) at bytecode.c:811 #8 0x000055555580ee6b in fetch_and_exec_byte_code (fun=0x55555734c7cd, args_template=0, nargs=0, args=0x0) at eval.c:3081 #9 0x000055555580f5a8 in funcall_lambda (fun=0x55555734c7cd, nargs=1, arg_vector=0x7fffffff6ce0) at eval.c:3242 #10 0x000055555580f00c in apply_lambda (fun=0x55555734c7cd, args=0x555557f7a2c3, count=...) at eval.c:3103 #11 0x000055555580d591 in eval_sub (form=0x555557f7a2b3) at eval.c:2545 #12 0x00005555558084f0 in Fsetq (args=0x555557f7a2a3) at eval.c:483 #13 0x000055555580cfa8 in eval_sub (form=0x555557f7a293) at eval.c:2449 #14 0x00005555558083bc in Fprogn (body=0x555557f7a363) at eval.c:436 #15 0x0000555555809b4e in Flet (args=0x555557f7a283) at eval.c:1026 #16 0x000055555580cfa8 in eval_sub (form=0x555557f7a223) at eval.c:2449 #17 0x000055555580d151 in eval_sub (form=0x555557f712b3) at eval.c:2465 #18 0x000055555580efa6 in apply_lambda (fun=0x555557f8049d, args=0x555557f712a3, count=...) at eval.c:3098 #19 0x000055555580d591 in eval_sub (form=0x555557f71883) at eval.c:2545 #20 0x000055555580cac8 in Feval (form=0x555557f71883, lexical=0x0) at eval.c:2361 #21 0x000055555580eb37 in funcall_subr (subr=0x555555e11ea0 , numargs=1, args=0x7fffffff7788) at eval.c:3036 #22 0x000055555580e63c in funcall_general (fun=0x555555e11ea5 , numargs=1, args=0x7fffffff7788) at eval.c:2941 #23 0x000055555580e909 in Ffuncall (nargs=2, args=0x7fffffff7780) at eval.c:2995 #24 0x000055555580ab30 in internal_condition_case_n (bfun=0x55555580e7eb , nargs=2, args=0x7fffffff7780, handlers=0x30, hfun=0x5555555ccfe7 ) at eval.c:1558 #25 0x00005555555cd24c in safe__call (inhibit_quit=true, nargs=2, func=0x6900, ap=0x7fffffff7840) at xdisp.c:3024 #26 0x00005555555cd450 in safe__call1 (inhibit_quit=true, fn=0x6900) at xdisp.c:3060 #27 0x00005555555cd4e0 in safe__eval (inhibit_quit=true, sexpr=0x555557f71883) at xdisp.c:3074 #28 0x000055555561367e in display_mode_element (it=0x7fffffff7d10, depth=2, field_width=0, precision=0, elt=0x555557f71873, props=0x0, risky=false) at xdisp.c:27228 #29 0x0000555555613a28 in display_mode_element (it=0x7fffffff7d10, depth=1, field_width=0, precision=0, elt=0x555557f79cd3, props=0x0, risky=false) at xdisp.c:27314 #30 0x0000555555612210 in display_mode_line (w=0x55555628c8c0, face_id=MODE_LINE_INACTIVE_FACE_ID, format=0x555557f79cd3) at xdisp.c:26740 #31 0x0000555555611efe in display_mode_lines (w=0x55555628c8c0) at xdisp.c:26653 #32 0x00005555555fcf67 in redisplay_window (window=0x55555628c8c5, just_this_one_p=false) at xdisp.c:20345 #33 0x00005555555f2e3f in redisplay_window_0 (window=0x55555628c8c5) at xdisp.c:17434 #34 0x000055555580a994 in internal_condition_case_1 (bfun=0x5555555f2dfd , arg=0x55555628c8c5, handlers=0x7ffff1adb5a3, hfun=0x5555555f2d16 ) at eval.c:1498 #35 0x00005555555f2cec in redisplay_windows (window=0x55555628c8c5) at xdisp.c:17404 #36 0x00005555555f1a9f in redisplay_internal () at xdisp.c:16854 --Type for more, q to quit, c to continue without paging-- #37 0x00005555555efb5e in redisplay () at xdisp.c:16043 #38 0x000055555574711a in read_char (commandflag=1, map=0x55556333fb33, prev_event=0x0, used_mouse_menu=0x7fffffffd2a9, end_time=0x0) at keyboard.c:2627 #39 0x0000555555758856 in read_key_sequence (keybuf=0x7fffffffd4e0, prompt=0x0, dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:10074 #40 0x00005555557438b0 in command_loop_1 () at keyboard.c:1376 #41 0x000055555580a8ed in internal_condition_case (bfun=0x5555557434a1 , handlers=0x90, hfun=0x555555742a7a ) at eval.c:1474 #42 0x0000555555743151 in command_loop_2 (handlers=0x90) at keyboard.c:1125 #43 0x0000555555809f61 in internal_catch (tag=0xff90, func=0x555555743127 , arg=0x90) at eval.c:1197 #44 0x00005555557430e3 in command_loop () at keyboard.c:1103 #45 0x000055555574261c in recursive_edit_1 () at keyboard.c:712 #46 0x00005555557427c8 in Frecursive_edit () at keyboard.c:795 #47 0x000055555573e88a in main (argc=1, argv=0x7fffffffd9a8) at emacs.c:2529 If I read the backtrace correctly, something in my custom mode-line is triggering Fmatch_data that creates markers. 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. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at