GNU bug report logs - #63844
30.0.50; [PATCH] Revert Python mode multiline font-lock

Previous Next

Package: emacs;

Reported by: kobarity <kobarity <at> gmail.com>

Date: Fri, 2 Jun 2023 14:23:02 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 63844 in the body.
You can then email your comments to 63844 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#63844; Package emacs. (Fri, 02 Jun 2023 14:23:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to kobarity <kobarity <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 02 Jun 2023 14:23:02 GMT) Full text and rfc822 format available.

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

From: kobarity <kobarity <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Cc: Eli Zaretskii <eliz <at> gnu.org>
Subject: 30.0.50; [PATCH] Revert Python mode multiline font-lock
Date: Fri, 02 Jun 2023 23:22:34 +0900
[Message part 1 (text/plain, inline)]
I'm sorry, but I would like to revert my following fix:

"Enhance Python font-lock to support multilines"
commit 4915ca5dd4245a909c046e6691e8d4a1919890c8

I have found that there are performance issues when editing a large
file.  The issue can be reproduced as follows:

1. emacs -Q
2. Open large Python file (e.g. turtle.py in Python)
3. Near the top of the buffer, enter open paren and some characters.

The above commit extends the region to be font-locked using
`python-nav-end-of-statement'.  However, if there are unbalanced
parens, it may move point to the end of the buffer.  This causes
almost the entire buffer to be font-locked, which is not acceptable
for large files.

Attached is a patch to revert the commit in emacs-29 branch.

Best Regards,

--
In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.16.0, Xaw scroll bars) of 2023-05-27 built on ubuntu
Repository revision: 1eb5faa26113afe5895955a74594e3d7cf6ffe98
Repository branch: master
System Description: Ubuntu 22.04.2 LTS

Configured features:
ACL CAIRO FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND
SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM XPM
LUCID ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date subr-x mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils term/screen term/xterm xterm byte-opt gv bytecomp
byte-compile rmc iso-transl tooltip cconv eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads inotify dynamic-setting system-font-setting font-render-setting
cairo x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 47140 9068)
 (symbols 48 5843 0)
 (strings 32 15000 1957)
 (string-bytes 1 423096)
 (vectors 16 8304)
 (vector-slots 8 106018 9640)
 (floats 8 25 10769)
 (intervals 56 300 2)
 (buffers 984 11))
[0001-Revert-Enhance-Python-font-lock-to-support-multiline.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#63844; Package emacs. (Sat, 03 Jun 2023 07:12:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: kobarity <kobarity <at> gmail.com>
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: 30.0.50; [PATCH] Revert Python mode multiline font-lock
Date: Sat, 03 Jun 2023 10:12:42 +0300
> Date: Fri, 02 Jun 2023 23:22:34 +0900
> From: kobarity <kobarity <at> gmail.com>
> Cc: Eli Zaretskii <eliz <at> gnu.org>
> 
> I'm sorry, but I would like to revert my following fix:
> 
> "Enhance Python font-lock to support multilines"
> commit 4915ca5dd4245a909c046e6691e8d4a1919890c8
> 
> I have found that there are performance issues when editing a large
> file.  The issue can be reproduced as follows:
> 
> 1. emacs -Q
> 2. Open large Python file (e.g. turtle.py in Python)
> 3. Near the top of the buffer, enter open paren and some characters.
> 
> The above commit extends the region to be font-locked using
> `python-nav-end-of-statement'.  However, if there are unbalanced
> parens, it may move point to the end of the buffer.  This causes
> almost the entire buffer to be font-locked, which is not acceptable
> for large files.
> 
> Attached is a patch to revert the commit in emacs-29 branch.

Thanks, installed on the emacs-29 branch.




Reply sent to Stefan Kangas <stefankangas <at> gmail.com>:
You have taken responsibility. (Fri, 01 Sep 2023 19:29:01 GMT) Full text and rfc822 format available.

Notification sent to kobarity <kobarity <at> gmail.com>:
bug acknowledged by developer. (Fri, 01 Sep 2023 19:29:01 GMT) Full text and rfc822 format available.

Message #13 received at 63844-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: kobarity <kobarity <at> gmail.com>, 63844-done <at> debbugs.gnu.org
Subject: Re: bug#63844: 30.0.50; [PATCH] Revert Python mode multiline font-lock
Date: Fri, 1 Sep 2023 21:28:29 +0200
> Thanks, installed on the emacs-29 branch.

This bug was left open, so I'm closing it now.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 30 Sep 2023 11:24:17 GMT) Full text and rfc822 format available.

This bug report was last modified 207 days ago.

Previous Next


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