tani...@ss.iij4u.or.jp writes: > When the variable `org-highlight-latex-and-related' is set to `(latex)', > opening an Org file and inserting or deleting characters may cause too > much time lag, making text editing difficult.
Thanks for reporting and for providing the detailed analysis! This is a known bug caused by overly complex regexps in `org-latex-regexps'. See https://list.orgmode.org/orgmode/F1IQSiX3SvGn1zq4pzoQ669N8S-qTDWNBWKuZpH9wQi8P_vjDSzgUHnLgxu5kuaDCyFmvjPt3e6rrd7YiO7wi5U_4ZdGtXMpZVkuqgZmBSU=@williamdenton.org/ > Versions prior to `80268c0e075bb69e7890146a8d7240e920fc786c' specify the > argument `BOUND' for `re-search-forward', so they are less likely to be > affected by file size and distance to the next LaTeX formula. Yeah, but dropping BOUND was intentional. It fixed some edge cases with incorrect fontification. -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>