org-mode/lisp
Nathan Dwarshuis 1b4fb607bd org-element.el: Make affiliated keyword interpreter faster
* lisp/org-element.el (org-element--interpret-affiliated-keywords):
Optimize performance by bypassing unnecessary types and reducing
loop complexity. Added new constant
`org-element-elements-no-affiliated` which stores the types to
be bypassed.

This function was doing redundant work on several levels which
dramatically reduced performance of interpreting element nodes
relative to object nodes.

First, all types were interpreted regardless of if they could
possibly contain affiliated keywords. Skipping these types
dramatically speeds up typical use cases since many of these
skipped types are common (headline, item, etc).

Second, the loop was much more complex than needed. The loop included
:standard-properties which should not be necessary here. It also
duplicated some work between calls to `org-element--properties-mapc`
and `mapconcat` (the code was moved entirely under the former). The
result should be faster and more readable.

TINYCHANGE
2024-11-29 17:05:54 -05:00
..
Makefile Fix parallel execution of Makefiles 2024-06-20 18:27:04 +02:00
ob-C.el ob-*: Do not emit redundant messages about code block evaluation 2024-06-13 15:22:28 +02:00
ob-R.el Add options to skip extra processing in org-babel-comint-with-output 2024-11-12 19:54:28 -08:00
ob-awk.el ob-*: Do not emit redundant messages about code block evaluation 2024-06-13 15:22:28 +02:00
ob-calc.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
ob-clojure.el Replace use of if-let and when-let, obsolete in Emacs 31.0.50 2024-10-27 10:34:05 +08:00
ob-comint.el Add options to skip extra processing in org-babel-comint-with-output 2024-11-12 19:54:28 -08:00
ob-core.el Replace use of if-let and when-let, obsolete in Emacs 31.0.50 2024-10-27 10:34:05 +08:00
ob-css.el Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
ob-ditaa.el ob-*: Do not emit redundant messages about code block evaluation 2024-06-13 15:22:28 +02:00
ob-dot.el Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
ob-emacs-lisp.el fixup! lisp/ob-emacs-lisp.el: Throw an error when session is requested 2024-04-09 16:35:44 +03:00
ob-eshell.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
ob-eval.el ob-core: Unify Org Babel related buffer names using constant variable 2024-07-16 19:09:45 +02:00
ob-exp.el Replace use of if-let and when-let, obsolete in Emacs 31.0.50 2024-10-27 10:34:05 +08:00
ob-forth.el Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
ob-fortran.el Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
ob-gnuplot.el Merge branch 'bugfix' 2024-08-22 14:37:15 +02:00
ob-groovy.el ob-*: Do not emit redundant messages about code block evaluation 2024-06-13 15:22:28 +02:00
ob-haskell.el Rename `org-babel-comint-prompt-regexp-old' to `...-fallback' 2024-08-05 17:02:56 +02:00
ob-java.el Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
ob-js.el Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
ob-julia.el Replace use of if-let and when-let, obsolete in Emacs 31.0.50 2024-10-27 10:34:05 +08:00
ob-latex.el org-babel-latex-process-alist: Use latemk or run latex trice 2024-06-03 16:32:02 +02:00
ob-lilypond.el Backport commit 45a20d781 from Emacs 2024-07-01 22:33:10 -04:00
ob-lisp.el Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
ob-lob.el Backport commit 6757f8e67 from Emacs 2024-07-14 12:20:46 -04:00
ob-lua.el Backport commit a7dff8c53 from Emacs 2024-06-27 23:13:47 -04:00
ob-makefile.el Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
ob-matlab.el Backport commit 8e1c56ae4 from Emacs 2024-01-06 15:48:23 -05:00
ob-maxima.el ob-*: Do not emit redundant messages about code block evaluation 2024-06-13 15:22:28 +02:00
ob-ocaml.el Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
ob-octave.el Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
ob-org.el Clean up spacing to pass Emacs's pre-commit check 2024-05-27 21:18:59 -04:00
ob-perl.el Backport commit 8e1c56ae4 from Emacs 2024-01-06 15:48:23 -05:00
ob-plantuml.el Backport commit 6757f8e67 from Emacs 2024-07-14 12:20:46 -04:00
ob-processing.el Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
ob-python.el Add options to skip extra processing in org-babel-comint-with-output 2024-11-12 19:54:28 -08:00
ob-ref.el Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
ob-ruby.el Rename `org-babel-comint-prompt-regexp-old' to `...-fallback' 2024-08-05 17:02:56 +02:00
ob-sass.el Backport commit 8e1c56ae4 from Emacs 2024-01-06 15:48:23 -05:00
ob-scheme.el Backport commit 6757f8e67 from Emacs 2024-07-14 12:20:46 -04:00
ob-screen.el ob-*: Do not emit redundant messages about code block evaluation 2024-06-13 15:22:28 +02:00
ob-sed.el ob-*: Do not emit redundant messages about code block evaluation 2024-06-13 15:22:28 +02:00
ob-shell.el org-babel-sh-prompt: Fix Emacs 27 CI failures 2024-08-06 20:11:45 +02:00
ob-sql.el Merge branch 'bugfix' 2024-07-25 13:22:41 +02:00
ob-sqlite.el ob-sqlite: Add ability to open a database in readonly mode 2024-06-25 12:53:52 +02:00
ob-table.el Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
ob-tangle.el Backport commit 6757f8e67 from Emacs 2024-07-14 12:20:46 -04:00
ob.el Backport commit 6757f8e67 from Emacs 2024-07-14 12:20:46 -04:00
oc-basic.el Backport commit c0eefebab from Emacs 2024-06-27 22:47:14 -04:00
oc-biblatex.el oc-biblatex: Allow native biblatex options in CITE_EXPORT 2024-04-26 15:23:29 +03:00
oc-bibtex.el Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
oc-csl.el oc-csl: New custom option `org-cite-csl-bibtex-titles-to-sentence-case' 2024-06-20 07:41:56 +02:00
oc-natbib.el Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
oc.el Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
ol-bbdb.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
ol-bibtex.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
ol-docview.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
ol-doi.el Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
ol-eshell.el org-id.el: Add search strings, inherit parent IDs 2024-02-24 15:56:44 +03:00
ol-eww.el org-id.el: Add search strings, inherit parent IDs 2024-02-24 15:56:44 +03:00
ol-gnus.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
ol-info.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
ol-irc.el org-id.el: Add search strings, inherit parent IDs 2024-02-24 15:56:44 +03:00
ol-man.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
ol-mhe.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
ol-rmail.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
ol-w3m.el Backport commit 0f3be9596 from Emacs 2024-05-28 22:58:43 -04:00
ol.el org-link: Customizable preview API for arbitrary link types 2024-11-27 19:34:26 +01:00
org-agenda.el org-agenda-write: Remove redundant `set-buffer' 2024-07-28 20:49:25 +02:00
org-archive.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
org-attach-git.el Backport commit 8e1c56ae4 from Emacs 2024-01-06 15:48:23 -05:00
org-attach.el org-link: Customizable preview API for arbitrary link types 2024-11-27 19:34:26 +01:00
org-capture.el org-capture-templates: Allow headline/olp target to be function or symbol 2024-06-18 14:33:55 +02:00
org-clock.el Replace use of if-let and when-let, obsolete in Emacs 31.0.50 2024-10-27 10:34:05 +08:00
org-colview.el org-colview: Fix ignoring org-agenda-columns-add-appointments-to-effort-sum 2024-10-12 09:31:44 +02:00
org-compat.el org-link: Customizable preview API for arbitrary link types 2024-11-27 19:34:26 +01:00
org-crypt.el Never pass error message verbatim as the first argument for `message'/`error' 2024-02-25 13:15:04 +03:00
org-ctags.el org-ctags: Don't assume ctags-program-name is bound 2024-05-28 23:23:39 -04:00
org-cycle.el org-link: Customizable preview API for arbitrary link types 2024-11-27 19:34:26 +01:00
org-datetree.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
org-duration.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
org-element-ast.el Replace use of if-let and when-let, obsolete in Emacs 31.0.50 2024-10-27 10:34:05 +08:00
org-element.el org-element.el: Make affiliated keyword interpreter faster 2024-11-29 17:05:54 -05:00
org-entities.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
org-faces.el Backport commit 6757f8e67 from Emacs 2024-07-14 12:20:46 -04:00
org-feed.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
org-fold-core.el org-fold-core: Fix bad interaction between fold overlays and isearch 2024-11-22 17:37:49 +01:00
org-fold.el Backport commit 6757f8e67 from Emacs 2024-07-14 12:20:46 -04:00
org-footnote.el org-footnote--collect-references: Fix infinite recursion 2024-11-23 20:44:07 +01:00
org-goto.el Replace use of if-let and when-let, obsolete in Emacs 31.0.50 2024-10-27 10:34:05 +08:00
org-habit.el Backport commit 6757f8e67 from Emacs 2024-07-14 12:20:46 -04:00
org-id.el org-id: Guard against unwarranted major-mode change when querying id 2024-09-22 12:41:54 +02:00
org-indent.el Backport commit fb11294d4 from Emacs 2024-06-27 23:13:49 -04:00
org-inlinetask.el Backport commit 6757f8e67 from Emacs 2024-07-14 12:20:46 -04:00
org-keys.el org-link: Customizable preview API for arbitrary link types 2024-11-27 19:34:26 +01:00
org-lint.el Replace use of if-let and when-let, obsolete in Emacs 31.0.50 2024-10-27 10:34:05 +08:00
org-list.el org-list-struct-apply-struct: Fix item contents breaking out of the item 2024-07-10 15:39:26 +02:00
org-macro.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
org-macs.el Merge branch 'bugfix' 2024-11-01 17:14:48 -07:00
org-mobile.el Backport commit 6757f8e67 from Emacs 2024-07-14 12:20:46 -04:00
org-mouse.el org-mouse-context-menu: Fix `grep' command to handle filenames starting with '-' 2024-11-09 15:33:38 +01:00
org-num.el org-num-skip-tags: Avoid using function that is not pre-loaded in autoloads 2024-06-14 14:25:03 +02:00
org-pcomplete.el Backport commit 77d0eed74 from Emacs 2024-06-09 20:50:50 -04:00
org-persist.el Replace use of if-let and when-let, obsolete in Emacs 31.0.50 2024-10-27 10:34:05 +08:00
org-plot.el org-link: Customizable preview API for arbitrary link types 2024-11-27 19:34:26 +01:00
org-protocol.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
org-refile.el org-refile: calculate file part of the outline path once per file 2024-10-15 20:48:10 +02:00
org-src.el org-src-get-lang-mode: Honor `major-mode-remap-alist' 2024-11-23 18:05:45 +01:00
org-table.el Merge branch 'bugfix' 2024-11-22 17:46:34 +01:00
org-tempo.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
org-timer.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
org.el org-link: Customizable preview API for arbitrary link types 2024-11-27 19:34:26 +01:00
ox-ascii.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
ox-beamer.el Replace use of if-let and when-let, obsolete in Emacs 31.0.50 2024-10-24 17:04:40 +08:00
ox-html.el org-src-get-lang-mode: Honor `major-mode-remap-alist' 2024-11-23 18:05:45 +01:00
ox-icalendar.el ox-icalendar: Fix export of diary-style timestamps 2024-09-22 12:22:33 +02:00
ox-koma-letter.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
ox-latex.el Replace use of if-let and when-let, obsolete in Emacs 31.0.50 2024-10-27 10:34:05 +08:00
ox-man.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
ox-md.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
ox-odt.el ox-odt: Fix exporting from buffers with non-standard encoding 2024-11-23 20:09:00 +01:00
ox-org.el Merge branch 'km/from-emacs-master' 2024-05-28 23:01:23 -04:00
ox-publish.el lisp/ox-publish.el: Use publish time in publish cache 2024-08-15 20:24:42 +02:00
ox-texinfo.el ox-texinfo: Fix definitions containing Org markup 2024-10-26 10:36:59 +02:00
ox.el Replace use of if-let and when-let, obsolete in Emacs 31.0.50 2024-10-27 10:34:05 +08:00