emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: "Fraga, Eric" <e.fraga@ucl.ac.uk>
Cc: Emacs Org mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: problem interaction between jinx-mode and org mode
Date: Thu, 06 Apr 2023 12:04:25 +0000	[thread overview]
Message-ID: <87edoxkyie.fsf@localhost> (raw)
In-Reply-To: <875ya9l04o.fsf@ucl.ac.uk>

"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	other threads:[~2023-04-06 12:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06 11:29 problem interaction between jinx-mode and org mode Fraga, Eric
2023-04-06 12:04 ` Ihor Radchenko [this message]
2023-04-06 15:33   ` Fraga, Eric

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.orgmode.org/

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

  git send-email \
    --in-reply-to=87edoxkyie.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.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/org-mode.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).