emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christopher Miles <numbchild@gmail.com>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: Is it possible to optimize Org Mode org-activate-links ?
Date: Sat, 13 Feb 2021 07:11:38 +0000	[thread overview]
Message-ID: <PAXPR08MB6640F9A31608E3D1A737FCA2A38A9@PAXPR08MB6640.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <87eehktze5.fsf@localhost>


[-- Attachment #1.1: Type: text/plain, Size: 1301 bytes --]

<#secure method=pgpmime mode=sign>

Thanks for your hints.

Should I use the following options? I saw the warning. Does this freeze happens often? I decide to try it.

(defvar org-element-use-cache nil
  "Non-nil when Org parser should cache its results.

WARNING: for the time being, using cache sometimes triggers
freezes.  Therefore, it is disabled by default.  Activate it if
you want to help debugging the issue.")

(defvar org-element-cache-sync-idle-time 0.6
  "Length, in seconds, of idle time before syncing cache.")

(defvar org-element-cache-sync-duration 0.04
  "Maximum duration, as a time value, for a cache synchronization.
If the synchronization is not over after this delay, the process
pauses and resumes after `org-element-cache-sync-break'
seconds.")

(defvar org-element-cache-sync-break 0.3
  "Duration, as a time value, of the pause between synchronizations.
See `org-element-cache-sync-duration' for more information.")


Ihor Radchenko <yantar92@gmail.com> writes:

Christopher Miles <numbchild@gmail.com> writes:
I checked org-element-context source code, it's not so long and complex. Why it caused so many items in Memory profiler result? Is it possible to optimize it?

You can try to use org-element-cache. That might help.

Best, Ihor

[-- Attachment #1.2: Type: text/html, Size: 3387 bytes --]

[-- Attachment #2: ATT00001.txt --]
[-- Type: text/plain, Size: 253 bytes --]

-- 
[ stardiviner ]
       I try to make every word tell the meaning that I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

  reply	other threads:[~2021-02-13  7:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-13  1:10 Is it possible to optimize Org Mode org-activate-links ? Christopher Miles
2021-02-13  3:33 ` Ihor Radchenko
2021-02-13  7:11   ` Christopher Miles [this message]
2021-02-13  7:54     ` Ihor Radchenko

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=PAXPR08MB6640F9A31608E3D1A737FCA2A38A9@PAXPR08MB6640.eurprd08.prod.outlook.com \
    --to=numbchild@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.com \
    /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).