all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 58558@debbugs.gnu.org, larsi@gnus.org, monnier@iro.umontreal.ca
Subject: bug#58558: 29.0.50; re-search-forward is slow in some buffers
Date: Tue, 13 Dec 2022 17:43:36 +0000	[thread overview]
Message-ID: <87bko78aif.fsf@localhost> (raw)
In-Reply-To: <83zgbrnv53.fsf@gnu.org>

Eli Zaretskii <eliz@gnu.org> 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 <Smatch_data>, 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 <Seval>, numargs=1, args=0x7fffffff7788) at eval.c:3036
#22 0x000055555580e63c in funcall_general (fun=0x555555e11ea5 <Seval+5>, 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 <Ffuncall>, nargs=2, args=0x7fffffff7780, handlers=0x30, hfun=0x5555555ccfe7 <safe_eval_handler>) 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 <redisplay_window_0>, arg=0x55555628c8c5, handlers=0x7ffff1adb5a3, hfun=0x5555555f2d16 <redisplay_window_error>) 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 <RET> 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 <command_loop_1>, handlers=0x90, hfun=0x555555742a7a <cmd_error>) 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 <command_loop_2>, 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 <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>





  reply	other threads:[~2022-12-13 17:43 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-16  1:26 bug#58558: 29.0.50; re-search-forward is slow in some buffers Ihor Radchenko
2022-10-16  9:19 ` Lars Ingebrigtsen
2022-10-16  9:34   ` Ihor Radchenko
2022-10-16  9:37     ` Lars Ingebrigtsen
2022-10-16 10:02       ` Ihor Radchenko
2022-10-16 10:04         ` Lars Ingebrigtsen
2022-10-16 10:53           ` Ihor Radchenko
2022-10-16 11:01             ` Lars Ingebrigtsen
2022-10-16 11:21               ` Eli Zaretskii
2022-10-16 14:23                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-17  0:56                   ` Ihor Radchenko
2022-10-18 11:50                     ` Lars Ingebrigtsen
2022-10-18 14:58                       ` Eli Zaretskii
2022-10-18 18:19                         ` Lars Ingebrigtsen
2022-10-18 18:38                           ` Eli Zaretskii
2022-12-13 10:28                           ` Ihor Radchenko
2022-12-13 13:11                             ` Eli Zaretskii
2022-12-13 13:32                               ` Ihor Radchenko
2022-12-13 14:28                                 ` Eli Zaretskii
2022-12-13 15:56                                   ` Ihor Radchenko
2022-12-13 16:08                                     ` Eli Zaretskii
2022-12-13 17:43                                       ` Ihor Radchenko [this message]
2022-12-13 17:52                                         ` Eli Zaretskii
2022-12-13 18:03                                           ` Ihor Radchenko
2022-12-13 20:02                                             ` Eli Zaretskii
2022-12-14 11:40                                               ` Ihor Radchenko
2022-12-14 13:06                                                 ` Eli Zaretskii
2022-12-14 13:23                                                   ` Ihor Radchenko
2022-12-14 13:32                                                     ` Eli Zaretskii
2022-12-14 13:39                                                       ` Ihor Radchenko
2022-12-14 14:12                                                         ` Eli Zaretskii
2022-12-13 18:15                                         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-13 18:40                                           ` Ihor Radchenko
2022-12-13 19:55                                             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-13 20:21                                               ` Eli Zaretskii
2022-12-14 11:42                                                 ` Ihor Radchenko
2022-12-13 17:38                                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-14 12:00                                       ` Ihor Radchenko
2022-12-14 12:23                                       ` Ihor Radchenko
2022-12-14 13:10                                         ` Eli Zaretskii
2022-12-14 13:26                                           ` Ihor Radchenko
2022-12-14 13:57                                             ` Eli Zaretskii
2022-12-14 14:01                                               ` Ihor Radchenko
2023-04-06 11:49                                                 ` Ihor Radchenko
2023-04-06 12:05                                                   ` Eli Zaretskii
2023-04-09 19:54                                                     ` Ihor Radchenko
2023-04-10  4:14                                                       ` Eli Zaretskii
2023-04-10 12:24                                                         ` Ihor Radchenko
2023-04-10 13:40                                                           ` Eli Zaretskii
2023-04-10 14:55                                                             ` Ihor Radchenko
2023-04-10 16:04                                                               ` Eli Zaretskii
2023-04-10 14:27                                                           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-11 11:29                                                             ` Ihor Radchenko
2023-04-11 11:51                                                               ` Eli Zaretskii
2023-04-12 13:39                                                                 ` Ihor Radchenko
2023-04-12 14:06                                                                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-12 14:30                                                                     ` Eli Zaretskii
2023-04-12 14:38                                                                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-12 15:22                                                                         ` Eli Zaretskii
2023-04-12 15:59                                                                           ` Alan Mackenzie
2023-04-12 14:38                                                                       ` Stephen Berman
2023-04-12 14:42                                                                       ` Ihor Radchenko
2023-04-12 14:39                                                                     ` Ihor Radchenko
2023-04-12 15:20                                                                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-12 23:23                                                                         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-13  4:33                                                                           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-13 20:05                                                                             ` Ihor Radchenko
2023-04-13  4:52                                                                           ` Eli Zaretskii
2023-04-13  5:15                                                                             ` Eli Zaretskii
2023-04-12 18:31                                                                     ` Alan Mackenzie
2023-04-12 23:25                                                                       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-13  4:43                                                                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-13 12:09                                                                     ` Ihor Radchenko
2022-12-13 13:27                             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-16 10:36         ` Eli Zaretskii
2023-02-19 12:17     ` Dmitry Gutov
2023-02-20 10:24       ` Ihor Radchenko
2023-02-20 14:54         ` Dmitry Gutov
2023-04-10  8:48 ` Mattias Engdegård
2023-04-10  9:57   ` Ihor Radchenko
2023-04-10 10:05     ` Mattias Engdegård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bko78aif.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=58558@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.