branch: externals/org commit ab7df301d21181828392c4f09c8e34838fa463ff Author: Ihor Radchenko <yanta...@posteo.net> Commit: Ihor Radchenko <yanta...@posteo.net>
org-persist--get-collection: Avoid slow-ish `replace-regexp-in-string' * lisp/org-persist.el (org-persist--get-collection): It should be faster to use `substring'. Link: https://orgmode.org/list/87h63cj1c5....@gmail.com --- lisp/org-persist.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org-persist.el b/lisp/org-persist.el index a639699d93..603d811778 100644 --- a/lisp/org-persist.el +++ b/lisp/org-persist.el @@ -640,7 +640,8 @@ MISC, if non-nil will be appended to the collection. It must be a plist." (nconc (list :container (org-persist--normalize-container container) :persist-file - (replace-regexp-in-string "^.." "\\&/" (org-id-uuid)) + (let ((uuid (org-id-uuid))) + (concat (substring uuid 0 2) "/" (substring uuid 2))) :associated associated) misc))))