all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* undo-auto--undoable-change infloop
@ 2022-07-26  3:54 Michael Heerdegen
  2022-07-26 12:04 ` Eli Zaretskii
  0 siblings, 1 reply; 35+ messages in thread
From: Michael Heerdegen @ 2022-07-26  3:54 UTC (permalink / raw)
  To: Emacs Development

Hello,

does somebody have a guess what is happening here?  After automatically
replacing thousands of matches in a buffer with my el-search, I got a
sluggish Emacs afterwards, after a short pause.  Emacs consumed 100% of
one CPU.  It took me hours to find something, and it seems to be
unrelated to my own code: `undo-auto--undoable-change'.  It seems to
recurse very deep, or to be called extremely often.  I managed to
produce a backtrace, see below.  How is that recursion even possible -
what could be going on?

TIA,

Michael


The backtrace (the first cursor blink afterwards seems to initiate the
problematic behavior):

  (timer-activate [t 25311 13221 560142 nil undo-auto--boundary-timer nil nil 540000 nil])
  (run-at-time 10 nil undo-auto--boundary-timer)
  (undo-auto--boundary-ensure-timer)
  (undo-auto--undoable-change)
  (timer-activate [t 25311 13220 972130 nil undo-auto--boundary-timer nil nil 860000 nil])
  (run-at-time 10 nil undo-auto--boundary-timer)
  (undo-auto--boundary-ensure-timer)
  (undo-auto--undoable-change)
  (timer-activate [t 25311 13220 562017 nil undo-auto--boundary-timer nil nil 682000 nil])
  (run-at-time 10 nil undo-auto--boundary-timer)
  (undo-auto--boundary-ensure-timer)
  (undo-auto--undoable-change)
  (timer-activate [t 25311 13220 175101 nil undo-auto--boundary-timer nil nil 375000 nil])
  (run-at-time 10 nil undo-auto--boundary-timer)
  (undo-auto--boundary-ensure-timer)
  (undo-auto--undoable-change)
  (timer-activate [t 25311 13219 728313 nil undo-auto--boundary-timer nil nil 962000 nil])
  (run-at-time 10 nil undo-auto--boundary-timer)
  (undo-auto--boundary-ensure-timer)
  (undo-auto--undoable-change)
  (timer-activate [t 25311 13219 407621 nil undo-auto--boundary-timer nil nil 486000 nil])
  (run-at-time 10 nil undo-auto--boundary-timer)
  (undo-auto--boundary-ensure-timer)
  (undo-auto--undoable-change)
  (timer-activate [t 25311 13219 71400 nil undo-auto--boundary-timer nil nil 128000 nil])
  (run-at-time 10 nil undo-auto--boundary-timer)
  (undo-auto--boundary-ensure-timer)
  (undo-auto--undoable-change)
  (timer-activate [t 25311 13218 786464 nil undo-auto--boundary-timer nil nil 766000 nil])
  (run-at-time 10 nil undo-auto--boundary-timer)
  (undo-auto--boundary-ensure-timer)
  (undo-auto--undoable-change)
  (timer-activate [t 25311 13218 551162 nil undo-auto--boundary-timer nil nil 891000 nil])
  (run-at-time 10 nil undo-auto--boundary-timer)
  (undo-auto--boundary-ensure-timer)
  (undo-auto--undoable-change)
  (timer-activate [t 25311 13218 258788 nil undo-auto--boundary-timer nil nil 94000 nil])
  (run-at-time 10 nil undo-auto--boundary-timer)
  (undo-auto--boundary-ensure-timer)
  (undo-auto--undoable-change)
  (timer-activate [t 25311 13218 89932 nil undo-auto--boundary-timer nil nil 31000 nil])
  (run-at-time 10 nil undo-auto--boundary-timer)
  (undo-auto--boundary-ensure-timer)
  (undo-auto--undoable-change)
  (timer-activate [t 25311 13217 955384 nil undo-auto--boundary-timer nil nil 756000 nil])
  (run-at-time 10 nil undo-auto--boundary-timer)
  (undo-auto--boundary-ensure-timer)
  (undo-auto--undoable-change)
  (timer-activate [t 25311 13217 847383 nil undo-auto--boundary-timer nil nil 663000 nil])
  (run-at-time 10 nil undo-auto--boundary-timer)
  (undo-auto--boundary-ensure-timer)
  (undo-auto--undoable-change)
  (timer-activate [t 25311 13217 765424 nil undo-auto--boundary-timer nil nil 571000 nil])
  (run-at-time 10 nil undo-auto--boundary-timer)
  (undo-auto--boundary-ensure-timer)
  (undo-auto--undoable-change)
  (timer-activate [t 25311 13207 807483 0.15 blink-cursor-timer-function nil nil 407999 nil])
  (run-at-time 0.15 0.15 blink-cursor-timer-function)
  (run-with-timer 0.15 0.15 blink-cursor-timer-function)
  (blink-cursor--start-timer)
  (blink-cursor-start)

When I redefine `undo-auto--undoable-change' with an empty body, the
problem disappears.  I could not reproduce something similar with normal
query-replace.



^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2022-10-09  4:23 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-26  3:54 undo-auto--undoable-change infloop Michael Heerdegen
2022-07-26 12:04 ` Eli Zaretskii
2022-07-27  3:52   ` Michael Heerdegen
2022-07-27  4:56     ` Michael Heerdegen
2022-07-27 11:20       ` Eli Zaretskii
2022-07-28  2:51         ` Michael Heerdegen
2022-07-28  3:10           ` Solved (was: undo-auto--undoable-change infloop) Michael Heerdegen
2022-07-28  5:49             ` Eli Zaretskii
2022-07-29  0:40               ` No, not solved " Michael Heerdegen
2022-07-29  3:44                 ` No, not solved Michael Heerdegen
2022-07-29  4:12                   ` Michael Heerdegen
2022-07-29  6:05                 ` No, not solved (was: undo-auto--undoable-change infloop) Eli Zaretskii
2022-07-27 11:20     ` undo-auto--undoable-change infloop Eli Zaretskii
2022-07-27 17:06       ` Michael Heerdegen
2022-07-27 17:34         ` Eli Zaretskii
2022-07-28  2:45           ` Michael Heerdegen
2022-07-29 14:49     ` Stefan Monnier
2022-07-30  1:14       ` Michael Heerdegen
2022-07-30  4:14         ` Michael Heerdegen
2022-07-30  5:54         ` Eli Zaretskii
2022-07-30  7:23         ` Stefan Monnier
2022-07-31  4:05           ` Michael Heerdegen
2022-08-05 14:42             ` Stefan Monnier
2022-08-06  0:26               ` Michael Heerdegen
2022-08-09  4:02               ` Michael Heerdegen
2022-08-09  8:00                 ` Stefan Monnier
2022-08-10  2:39                   ` Michael Heerdegen
2022-09-21 13:28                     ` Madhu
2022-09-21 14:17                       ` timer.el API (was: undo-auto--undoable-change infloop) Stefan Monnier
2022-10-03 20:59                         ` timer.el API Michael Heerdegen
2022-10-03 22:10                           ` Stefan Monnier
2022-10-03 22:33                             ` Michael Heerdegen
2022-10-07 20:50                       ` undo-auto--undoable-change infloop Stefan Monnier
2022-10-09  2:32                         ` Madhu
2022-10-09  4:23                           ` Stefan Monnier

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.