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 via email to