Subject: bug#21144: Performance problem with certain text editing operations (emacs 24.4.1)

From: [email-masked]
Date: Tue, 09 Aug 2016 21:10:39 -0400

tags 21144 moreinfo
quit

Aaron Sokoloski <[email-masked]> writes:

> Hi folks,
>
> I've run into something that I can't figure out. Emacs 24.4.1 usually hangs for a short time (on the order of a second) when I do one of these things:
>
> 1) Kill a line
> 2) Kill a region
> 3) run kill-ring save
>
> It seems to be slow to do anything that copies text to the kill ring. Occasionally it seems like something I do (can't figure out what) makes it temporarily fast again, but
> then gradually slow down again until it takes about 1 second. It doesn't happen all the time, but when it happens it happens pretty reliably.
>
> The -q option does not make any difference. Font-lock-mode doesn't make any difference, nor does the size of the buffer seem to.
>
> Nothing exciting seems to show up under profiling -- the big cpu users are just the profiling stuff like the report. Also, setting debug-on-quit and pressing ctrl-g during the
> lag doesn't make the debugger pop up.
>
> However, I can't seem to reproduce the lag when running with -nw, so maybe it's something with the windowing.
>
> I'm running debian jesse, with awesome window manager version v3.4.15.
>
> As you can imagine, this is pretty distracting, so I'd appreciate any help anyone can provide!

Do you still see this with more recent Emacs?  If yes, are you running
any kind of daemon that monitors the clipboard?  The symptoms sound a
bit like http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24013 "[KDE/Plasma
5] Emacs 25.x uses up all memory and needs to be killed".

Also, if you can add the details that report-emacs-bug usually gives,
whether you're using gtk or lucid toolkit could be significant.