emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem interaction between jinx-mode and org mode


From: Ihor Radchenko
Subject: Re: problem interaction between jinx-mode and org mode
Date: Thu, 06 Apr 2023 12:04:25 +0000

"Fraga, Eric" <e.fraga@ucl.ac.uk> writes:

> --8<---------------cut here---------------start------------->8---
> ┌ Debug: Placing hot node
> │   node = n29
> └ @ HeatExchangerNetworkDesign
> ~/s/research/julia/HeatExchangerNetworkDesign/src/HeatExchangerNetworkDesign.jl:1102
> ┌ Debug: Layout for node
> │   node = n18
> │   y = 6
> └ @ HeatExchangerNetworkDesign 
> --8<---------------cut here---------------end--------------->8---

This is one long paragraph containing ~..., which is matching a possible
~code~ markup. org-element-code-parser tries to search the matching the
closing "~", running regexp search until the end of the paragraph.

> The profiler output for CPU:
>
> --8<---------------cut here---------------start------------->8---
>        47871  96%    - jinx--check-pending
>        47869  96%     - jinx--check-region
>        47861  96%      - jinx--flyspell-ignored-p
>        47861  96%       - org-mode-flyspell-verify
>        47837  96%        - org--flyspell-object-check-p
>        47837  96%         - org-element-context
>        46973  94%          - org-element--object-lex
>        46022  92%           - org-element-code-parser

So, jinx--check-region is triggering org-element-context on every single
word. This will run regexp search N_words times, making Emacs do regexp
search until the end of the paragraph each time.

In the absence of object cache, this is indeed slow.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
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>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]