all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Joseph Mingrone <jrm@ftfl.ca>
Cc: 32523@debbugs.gnu.org
Subject: bug#32523: 27.0.50; Emacs hangs when killing rectangle
Date: Fri, 21 Aug 2020 04:51:37 -0700	[thread overview]
Message-ID: <CADwFkm=VNeYPTHPLtnk6JaN8dHcPN6pm4yCM4fyPPxcCQjCdTw@mail.gmail.com> (raw)
In-Reply-To: <86zhxaoerj.fsf@phe.ftfl.ca> (Joseph Mingrone's message of "Sat,  25 Aug 2018 08:40:48 -0300")

Joseph Mingrone <jrm@ftfl.ca> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> From: Joseph Mingrone <jrm@ftfl.ca>
>>> Date: Fri, 24 Aug 2018 21:59:48 -0300
>
>>> Here is a recipe to make Emacs (nearly) hang indefinitely.
>
>>> 1. emacs -Q
>
>>> 2. Visit the file found https://ftfl.ca/misc/big_file_hangs_emacs.txt
>
>>> 3. M-x toggle-truncate-lines
>
>>> 4. Use rectangle-mark-mode (C-x SPC) to mark the rectangle that starts
>>>    at the top left of the file (point 1), and includes the leading white
>>>    space, the line numbers, and the space after the line numbers (point
>>>    468848).
>
>>> 5. Kill the rectangle with C-x r k.
>
>>> For me, the Emacs process will continue to use 100% CPU and Emacs is
>>> almost completely unresponsive and has to be killed.  Some actions such
>>> as saving the file may complete, but only after a few minutes.
>
>> It doesn't hang, it just takes very long to finish that operation (3
>> min on my machine with an unoptimized build; should be something like
>> 1 to 1.5 min in an optimized build).
>
>> This belongs to the "Emacs is very slow with long lines" class of
>> problems: the file has 2900-character lines.  If this file will never
>> include any text, I suggest to visit it with
>> "M-x find-file-literally", then the problem of slowness will go away.
>
> Thanks for the `find-file-literally' tip.
>
> The rectangle does eventually get cut for me as well.  Ignoring speed,
> the problem is that Emacs is unusable afterwards.  For example, if I go
> away for an hour or so, then return, the Emacs process will still be
> using something close to 100% CPU and trying to doing something simple,
> like moving the point forward, may take minutes.

Are you still seeing this behaviour?

If yes, could you try to run the profiler to see what Emacs is spending
so much time doing?

Best regards,
Stefan Kangas





  reply	other threads:[~2020-08-21 11:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-25  0:59 bug#32523: 27.0.50; Emacs hangs when killing rectangle Joseph Mingrone
2018-08-25  8:11 ` Eli Zaretskii
2018-08-25 11:40   ` Joseph Mingrone
2020-08-21 11:51     ` Stefan Kangas [this message]
2020-08-21 13:42       ` Eli Zaretskii
2020-08-21 14:06         ` Stefan Kangas
2020-08-21 14:28           ` Eli Zaretskii
2020-08-24 18:44           ` Joseph Mingrone

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='CADwFkm=VNeYPTHPLtnk6JaN8dHcPN6pm4yCM4fyPPxcCQjCdTw@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=32523@debbugs.gnu.org \
    --cc=jrm@ftfl.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.