emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: emacs-orgmode@gnu.org
Cc: Ihor Radchenko <yantar92@gmail.com>
Subject: [RFC PATCH 0/2] Make org-babel-tangle usable in after-save-hook on large org buffers
Date: Mon,  7 Feb 2022 20:31:13 +0800	[thread overview]
Message-ID: <cover.1644236545.git.yantar92@gmail.com> (raw)

I would like to send an experimental patch improving performance of
org-babel-tangle.  The patch contains two major changes:
1. org-babel-tangle-single-block will not try to parse LINK to src
   block when :comments is set to "no" and simple return nil in
   relevant slot of the parsed src block structure.
2. org-babel-expand-noweb-references cache will be saved between the
   function calls (reset on buffer edits)

Because I am not very familiar with org-babel internals, I would like
more knowledgeable people to review the changes and let me know if I
overlooked some unexpected side-effects.

Also, testing tangle performance on real Org files with many code
blocks would be appreciated. On my side, the tangling time has been
reduced from >6 sec down to 0.1-0.2 sec (with this patch and
org-element-cache combined).

Best,
Ihor

Ihor Radchenko (2):
  org-babel-tangle-single-block: Do not create comment link when not
    requested
  org-babel-expand-noweb-references: Cache block info

 lisp/ob-core.el   | 225 ++++++++++++++++++++++++++--------------------
 lisp/ob-tangle.el |  24 ++---
 2 files changed, 141 insertions(+), 108 deletions(-)

-- 
2.34.1



             reply	other threads:[~2022-02-07 12:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07 12:31 Ihor Radchenko [this message]
2022-02-07 12:31 ` [RFC PATCH 1/2] org-babel-tangle-single-block: Do not create comment link when not requested Ihor Radchenko
2022-02-07 12:31 ` [RFC PATCH 2/2] org-babel-expand-noweb-references: Cache block info Ihor Radchenko
2022-07-31  6:43 ` [RFC PATCH 0/2] Make org-babel-tangle usable in after-save-hook on large org buffers 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=cover.1644236545.git.yantar92@gmail.com \
    --to=yantar92@gmail.com \
    --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).