[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Babel evaluation: location and timing information
From: |
Ihor Radchenko |
Subject: |
Re: [PATCH] Babel evaluation: location and timing information |
Date: |
Tue, 20 Sep 2022 16:29:48 +0800 |
Timothy <orgmode@tec.tecosaur.net> writes:
> - (message "executing %s code block%s..."
> + (message "executing %s %s %s..."
> (capitalize lang)
> + (pcase (org-element-type (org-element-at-point))
> + ('src-block "code block")
> + ('babel-call "call")
> + ('paragraph "inline code block"))
This will not work, for example, when inline src block is located inside
a headline. One can think of various other non-paragraph scenarios as well.
Also, even though org-element-at-point should be caching recent calls,
I'd try to test the performance before/after the patch on large number
of src blocks (like in your config). org-element-at-point can add a fair
bit of CPU load in some scenarios where we have fallback to the full
O(Log N) AVL-tree lookup.
> + (let ((time-info
> + (if (and exec-time (> (float-time exec-time) 0.05))
> + (format " (took %.1fs)" (float-time exec-time))
Why 0.05??
--
Ihor Radchenko,
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