unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#51006: 28.0.60; Slowness while navigating in inferior-python-mode
@ 2021-10-04 12:54 Simen Heggestøyl
  2021-10-04 13:24 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Simen Heggestøyl @ 2021-10-04 12:54 UTC (permalink / raw)
  To: 51006

The following recipe makes Emacs freeze, starting from 'emacs -Q':

1. Type 'M-x run-python RET'.

2. In the inferior-python-mode buffer that pops up, insert the following:

{
    "foo-1": "bar-1",
    "foo-2": "bar-2",
    "foo-3": "bar-3",
    "foo-4": "bar-4",
    "foo-5": "bar-5",
    "foo-6": "bar-6",
    "foo-7": "bar-7",
    "foo-8": "bar-8",
    "foo-9": "bar-9",
}

3. Navigate up and down inside this structure by running 'next-line' and
   'previous-line' in quick succession, alternating between them.

4. The movement appears slower and slower, eventually freezing up Emacs.

I've observed this in Emacs 27.2 as well, so it doesn't seem new to
Emacs 28.

Here's the report from a quick profiling I did in Emacs 28:

13447  94% - python-shell-font-lock-post-command-hook
13444  94%  - font-lock-ensure
13444  94%   - #<compiled -0x19f3968dc99b6307>
13444  94%    - font-lock-fontify-region
13444  94%     - font-lock-default-fontify-region
13420  94%      - font-lock-fontify-syntactically-region
13420  94%       - python-font-lock-syntactic-face-function
13412  94%        - python-info-docstring-p
13396  94%         + python-nav-beginning-of-statement
    4   0%         + python-info-assignment-statement-p
    8   0%      + font-lock-fontify-keywords-region
    3   0%  + font-lock-mode
  529   3% + ...
  183   1% + command-execute





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

end of thread, other threads:[~2022-07-22 20:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-04 12:54 bug#51006: 28.0.60; Slowness while navigating in inferior-python-mode Simen Heggestøyl
2021-10-04 13:24 ` Eli Zaretskii
2021-10-04 19:21   ` Simen Heggestøyl
     [not found]   ` <87mtno8ujv.fsf@simenheg@gmail.com>
2021-10-04 19:52     ` Eli Zaretskii
2022-07-22  9:41       ` Simen Heggestøyl
2022-07-22 11:22         ` Eli Zaretskii
2022-07-22 20:06           ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).