unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Gregory Heytings <gregory@heytings.org>
Cc: Eli Zaretskii <eliz@gnu.org>, 57207@debbugs.gnu.org
Subject: bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling)
Date: Wed, 24 Aug 2022 16:08:32 +0800	[thread overview]
Message-ID: <CACnOyihJdyrforcoSw7z48f_UBLzzX3G3WPXC92sX-14YJ1NNQ@mail.gmail.com> (raw)
In-Reply-To: <06db1973da523e62ad39@heytings.org>

[-- Attachment #1: Type: text/plain, Size: 7900 bytes --]

With the latest master, the fontification gets completely broken.

IDK if it is related to this specific patch, but I got the following
redisplay backtrace.
Note that org-element--parse-objects has the following:

  (save-excursion
    (save-restriction
      (narrow-to-region beg end)
      (goto-char (point-min))
      (let (next-object contents)
(while (and (not (eobp))
   (setq next-object (org-element--object-lex restriction)))

The infinite recursion did not happen on the same Org file in the past. So,
it is not an issue with logic. Most likely, there is something about
narrowing/point movement that is very wrong on Emacs master.

(Another oddity is https://list.orgmode.org/87y1vf2zbe.fsf@localhost/T/#t)

Error: excessive-lisp-nesting nil
  debug-early-backtrace()
  debug-early(error (excessive-lisp-nesting))
  rx--parse-any((space 45 40 39 34 123))
  rx--translate-any(nil (space 45 40 39 34 123))
  rx--translate-form((any space 45 40 39 34 123))
  rx--translate((any space 45 40 39 34 123))
  #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_2>((any space
45 40 39 34 123))
  mapcan(#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_2> ((any
space 45 40 39 34 123)))
  rx--translate-or((line-start (any space 45 40 39 34 123)))
  rx--translate-form((or line-start (any space 45 40 39 34 123)))
  rx--translate((or line-start (any space 45 40 39 34 123)))
  rx--translate-seq(((or line-start (any space 45 40 39 34 123)) "*" (not
space)))
  rx--translate-form((seq (or line-start (any space 45 40 39 34 123)) "*"
(not space)))
  rx--translate((seq (or line-start (any space 45 40 39 34 123)) "*" (not
space)))
  rx-to-string((seq (or line-start (any space 45 40 39 34 123)) "*" (not
space)))
  org-element--parse-generic-emphasis("*" bold)
  org-element-bold-parser()
  org-element--object-lex((bold citation code entity export-snippet
footnote-reference inline-babel-call inline-src-block italic line-break
latex-fragment link macro radio-target statistics-cookie strike-through
subscript superscript target timestamp underline verbatim))
--- (line repeated 100s of times) ----
  org-element--parse-objects(5 54 (bold (:begin 4 :end 55 :post-blank 0
:contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55
:post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4
:end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold
(:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent
(bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54
:parent ( (bold citation code entity export-snippet footnote-reference
inline-babel-call inline-src-block italic line-break latex-fragment link
macro radio-target statistics-cookie strike-through subscript superscript
target timestamp underline verbatim))
  org-element--parse-objects(5 54 (bold (:begin 4 :end 55 :post-blank 0
:contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55
:post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4
:end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold
(:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent
(bold (:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end
54)))))))))) (bold citation code entity export-snippet footnote-reference
inline-babel-call inline-src-block italic line-break latex-fragment link
macro radio-target statistics-cookie strike-through subscript superscript
target timestamp underline verbatim))
  org-element--parse-objects(5 54 (bold (:begin 4 :end 55 :post-blank 0
:contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55
:post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4
:end 55 :post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold
(:begin 4 :end 55 :post-blank 0 :contents-begin 5 :contents-end 54))))))))
(bold citation code entity export-snippet footnote-reference
inline-babel-call inline-src-block italic line-break latex-fragment link
macro radio-target statistics-cookie strike-through subscript superscript
target timestamp underline verbatim))
  org-element--parse-objects(5 54 (bold (:begin 4 :end 55 :post-blank 0
:contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55
:post-blank 0 :contents-begin 5 :contents-end 54 :parent (bold (:begin 4
:end 55 :post-blank 0 :contents-begin 5 :contents-end 54)))))) (bold
citation code entity export-snippet footnote-reference inline-babel-call
inline-src-block italic line-break latex-fragment link macro radio-target
statistics-cookie strike-through subscript superscript target timestamp
underline verbatim))
  org-element--parse-objects(5 54 (bold (:begin 4 :end 55 :post-blank 0
:contents-begin 5 :contents-end 54 :parent (bold (:begin 4 :end 55
:post-blank 0 :contents-begin 5 :contents-end 54)))) (bold citation code
entity export-snippet footnote-reference inline-babel-call inline-src-block
italic line-break latex-fragment link macro radio-target statistics-cookie
strike-through subscript superscript target timestamp underline verbatim))
  org-element--parse-objects(5 54 (bold (:begin 4 :end 55 :post-blank 0
:contents-begin 5 :contents-end 54)) (bold citation code entity
export-snippet footnote-reference inline-babel-call inline-src-block italic
line-break latex-fragment link macro radio-target statistics-cookie
strike-through subscript superscript target timestamp underline verbatim))
  org-element--parse-objects(242 246 nil (bold citation code entity
export-snippet footnote-reference inline-babel-call inline-src-block italic
latex-fragment link macro radio-target statistics-cookie strike-through
subscript superscript target timestamp underline verbatim) (headline
(:raw-value "Home" :begin 240 :end 13776 :pre-blank 358 :contents-begin 264
:contents-end 13776 :robust-begin 266 :robust-end 13774 :level 1 :priority
nil :tags (#("COMMON" 0 6 (fontified t)) #("NOCLOCK" 0 7 (fontified t)))
:todo-keyword nil :todo-type nil :post-blank 359 :footnote-section-p nil
:archivedp nil :commentedp nil :post-affiliated 240 :parent nil :structure
nil :deferred org-element-headline-parser--deferred)))
  org-element-headline-parser(327004 nil)
  org-element--current-element(327004 object nil nil)
  org-element--parse-elements(240 327004 nil nil object nil nil
no-recursion)
  org-element-parse-element((headline (:raw-value #1="Home" :begin 240 :end
327004 :pre-blank 0 :contents-begin 264 :contents-end 326998 :robust-begin
356 :robust-end 326996 :level 1 :priority nil :tags ("COMMON" "NOCLOCK")
:todo-keyword nil :todo-type nil :post-blank 2 :footnote-section-p nil
:archivedp nil :commentedp nil :post-affiliated 240 :parent #2=(org-data
(:begin 1 :contents-begin 1 :contents-end 326998 :end 327004 :robust-begin
123 :robust-end 326996 :post-blank 2 :post-affiliated 1 :path
"/home/yantar92/Org/TODO.org" :mode org-data :ID
"157580d6-61cc-4541-bf5c-46a1dbf25b13" :CATEGORY "TODO" :cached t
:org-element--cache-sync-key nil)) :structure nil :deferred nil :title #1#
:mode nil :granularity element :org-element--cache-sync-key nil :cached t
:ID "2489bdb2-054e-4dc1-97d6-3298c70b742a" :ORG-TIME-BALANCE-MULTIPLIER "1"
:fragile-cache #<hash-table equal 2/65 0x1ffb2d613ec3>)) object nil
no-recursion)
  org-font-lock-matcher(1542)
  font-lock-fontify-keywords-region(1 1542 nil)
  font-lock-default-fontify-region(1 1501 nil)
  font-lock-fontify-region(1 1501)
  #f(compiled-function (fun) #<bytecode
-0x156e7c74145e6b83>)(font-lock-fontify-region)
  jit-lock--run-functions(1 1501)
  jit-lock-fontify-now(1 1501)
  jit-lock-function(1)
  redisplay_internal\ \(C\ function\)()

On Tue, Aug 23, 2022 at 11:53 PM Gregory Heytings <gregory@heytings.org>
wrote:

>
> >> Eli, do you have any objections about that patch (which replaces MODIFF
> >> with CHARS_MODIFF in the long lines detection code), or can I push it
> >> to master?
> >
> > No objections.
> >
>
> Thanks, now done.
>

[-- Attachment #2: Type: text/html, Size: 8833 bytes --]

  reply	other threads:[~2022-08-24  8:08 UTC|newest]

Thread overview: 103+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-14 15:55 bug#57207: 29.0.50; Fontification is slow after e7b5912b23 (Improvements to long lines handling) Ihor Radchenko
2022-08-14 16:08 ` Gregory Heytings
2022-08-14 17:31   ` Eli Zaretskii
2022-08-15  2:35     ` Eli Zaretskii
2022-08-15  9:03       ` Gregory Heytings
2022-08-15 11:41     ` Ihor Radchenko
2022-08-15 12:08       ` Eli Zaretskii
2022-08-16 10:47     ` Gregory Heytings
2022-08-16 11:55       ` Eli Zaretskii
2022-08-16 12:16         ` Ihor Radchenko
2022-08-16 12:24           ` Gregory Heytings
2022-08-16 12:39           ` Eli Zaretskii
2022-08-16 12:17         ` Gregory Heytings
2022-08-16 12:28           ` Ihor Radchenko
2022-08-16 12:43             ` Gregory Heytings
2022-08-20 16:50               ` Gregory Heytings
2022-08-21  3:25                 ` Ihor Radchenko
2022-08-21  9:01                   ` Gregory Heytings
2022-08-22  2:31                     ` Ihor Radchenko
2022-08-22 14:09                       ` Gregory Heytings
2022-08-22 15:45                         ` Eli Zaretskii
2022-08-23 15:53                           ` Gregory Heytings
2022-08-24  8:08                             ` Ihor Radchenko [this message]
2022-08-24  8:26                               ` Gregory Heytings
2022-10-10  8:09                                 ` Lars Ingebrigtsen
2022-10-10 12:03                                   ` Gregory Heytings
2022-10-11  0:25                                     ` Lars Ingebrigtsen
2022-12-08 10:05                                 ` Gregory Heytings
2022-08-16 12:50             ` Eli Zaretskii
2022-08-16 12:43           ` Eli Zaretskii
2022-08-15 11:39   ` Ihor Radchenko
2022-08-15 12:06     ` Eli Zaretskii
2022-08-15 14:12       ` Ihor Radchenko
2022-08-15 14:28         ` Eli Zaretskii
2022-08-15 17:08           ` Eli Zaretskii
2022-08-16  9:39             ` Ihor Radchenko
2022-08-16 12:33               ` Eli Zaretskii
2022-08-16 12:44                 ` Gregory Heytings
2022-08-16  9:38           ` Ihor Radchenko
2022-08-14 16:24 ` Eli Zaretskii
2022-08-15 11:42   ` Ihor Radchenko
2022-08-15 11:53     ` Lars Ingebrigtsen
2022-08-15 12:10       ` Eli Zaretskii
2022-08-17 10:42         ` Lars Ingebrigtsen
2022-08-17 12:10           ` Eli Zaretskii
2022-08-17 12:36             ` Lars Ingebrigtsen
2022-08-17 13:27               ` Eli Zaretskii
2022-08-18 13:02                 ` Lars Ingebrigtsen
2022-08-18 13:23                   ` Eli Zaretskii
2022-08-18 13:33                     ` Eli Zaretskii
2022-08-18 13:51                       ` Lars Ingebrigtsen
2022-08-18 14:01                         ` Lars Ingebrigtsen
2022-08-18 14:10                           ` Eli Zaretskii
2022-08-18 14:13                             ` Eli Zaretskii
2022-08-18 13:50                     ` Lars Ingebrigtsen
2022-08-18 13:58                       ` Eli Zaretskii
2022-08-18 14:02                         ` Lars Ingebrigtsen
2022-08-18 14:13                           ` Lars Ingebrigtsen
2022-08-18 14:14                           ` Lars Ingebrigtsen
2022-08-18 14:32                             ` Eli Zaretskii
2022-08-18 14:38                               ` Lars Ingebrigtsen
2022-08-18 15:49                                 ` Eli Zaretskii
2022-08-19 12:02                                   ` Lars Ingebrigtsen
2022-08-19 12:22                                     ` Eli Zaretskii
2022-08-19 15:50                                       ` Lars Ingebrigtsen
2022-08-19 16:02                                         ` Lars Ingebrigtsen
2022-08-19 16:08                                           ` Lars Ingebrigtsen
2022-08-19 16:11                                             ` Eli Zaretskii
2022-08-19 16:16                                               ` Lars Ingebrigtsen
2022-08-19 17:21                                                 ` Eli Zaretskii
2022-08-19 17:25                                                   ` Lars Ingebrigtsen
2022-08-19 17:51                                                     ` Eli Zaretskii
2022-08-20  9:15                                                       ` Lars Ingebrigtsen
2022-08-20  9:29                                                         ` Eli Zaretskii
2022-08-20  9:57                                                           ` Lars Ingebrigtsen
2022-08-20 10:33                                                             ` Eli Zaretskii
2022-08-20 17:14                                                 ` Gregory Heytings
2022-08-20 17:26                                                   ` Eli Zaretskii
2022-08-20 17:46                                                     ` Gregory Heytings
2022-08-20 23:22                                                       ` Gregory Heytings
2022-08-21  5:46                                                         ` Eli Zaretskii
2022-08-21 11:43                                                           ` Gregory Heytings
2022-08-21 12:02                                                             ` Eli Zaretskii
2022-08-21 12:42                                                               ` Gregory Heytings
2022-08-21 12:47                                                                 ` Lars Ingebrigtsen
2022-08-21 13:22                                                                   ` Gregory Heytings
2022-08-21 13:27                                                                     ` Lars Ingebrigtsen
2022-08-21 13:32                                                                       ` Gregory Heytings
2022-08-21 13:37                                                                         ` Lars Ingebrigtsen
2022-08-21 13:42                                                                           ` Eli Zaretskii
2022-08-21 13:38                                                                         ` Gregory Heytings
2022-08-21 13:39                                                                         ` Eli Zaretskii
2022-08-21 12:53                                                                 ` Eli Zaretskii
2022-08-21 13:18                                                                   ` Gregory Heytings
2022-08-21 13:24                                                                     ` Eli Zaretskii
2022-08-21 19:38                                                                     ` Gregory Heytings
2022-08-21 20:47                                                                       ` Lars Ingebrigtsen
2022-08-22 12:32                                                                       ` Eli Zaretskii
2022-08-22 14:00                                                                         ` Gregory Heytings
2022-08-21 12:08                                                   ` Lars Ingebrigtsen
2022-08-19 16:20                                               ` Visuwesh
2022-08-19 17:22                                                 ` Eli Zaretskii
2022-08-19 16:12                                         ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACnOyihJdyrforcoSw7z48f_UBLzzX3G3WPXC92sX-14YJ1NNQ@mail.gmail.com \
    --to=yantar92@gmail.com \
    --cc=57207@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=gregory@heytings.org \
    /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 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).