GNU bug report logs - #51006
28.0.60; Slowness while navigating in inferior-python-mode

Previous Next

Package: emacs;

Reported by: Simen Heggestøyl <simenheg <at> runbox.com>

Date: Mon, 4 Oct 2021 12:55:01 UTC

Severity: normal

Found in version 28.0.60

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Simen Heggestøyl <simenheg <at> runbox.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.60; Slowness while navigating in inferior-python-mode
Date: Mon, 04 Oct 2021 14:54:24 +0200
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




This bug report was last modified 2 years and 337 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.