GNU bug report logs -
#44610
27.1; Keyboard Macro Performance Problem
Previous Next
Full log
View this message in rfc822 format
> From: Robert Thorpe <rt <at> robertthorpeconsulting.com>
> Date: Fri, 13 Nov 2020 02:51:12 +0000
>
>
> This bug report comes from a discussion on Emacs reddit.
>
> Start with a blank buffer and create about ~300 lines of the string:
>
> ffffffffffffffffffff (pppppppppppppppppppp);
>
> This will be turned into:
>
> 'ffffffffffffffffffff':
>
> That can be done using the following keyboard macro: M-m ' M-f ' : C-k
> C-n
>
> You can apply that to every line in the buffer using C-u 300 f4.
>
> Now here's the strange bit. In a fundamental-mode buffer this is
> extremely fast, nearly instantaneous. But, in a python-mode buffer it
> takes 20 to 30 seconds. If the mode is c-mode then it is also much
> slower than fundamental-mode. It will also exceed the variable binding
> depth in some cases. Oddly it is faster if you use forward-line instead
> of C-n.
I suggest to produce and present a profile of this. Invoke this macro
after "M-x profiler-start RET RET", then "M-x profiler-report RET",
expand the profile fully by "C-u RET" on the top line, and post the
result here. That should give some clues.
This bug report was last modified 4 years and 216 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.