|
From: | Gregory Heytings |
Subject: | bug#59919: 28.1.50; "kill-matching-lines" takes forever |
Date: | Fri, 09 Dec 2022 09:23:38 +0000 |
The kill-matching-lines function takes far too long. Trying to kill lines matching the "ssh" regexp in the attached file takes minutes to complete. The actual file I'm working on is much bigger, and emacs just hangs. Reciple to reproduce:$ bunzip2 log.txt.bz2 $ emacs -Q log.txt M-x kill-matching-lines Kill lines containing match for regexp: ssh
Are you sure you actually want to _kill_ ("cut" in modern parlance) those lines? In the file you attach, all 10000 lines match "ssh", so it means that Emacs "cuts" each of those lines one by one, which of course takes (quite) some time. If you use a regexp that does not match all lines, say "109.106.244.80", the effect is almost instantaneous.
Note that there is also a command "flush-lines", is that not the one you actually need here?
[Prev in Thread] | Current Thread | [Next in Thread] |