emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Morgan Smith <morgan.j.smith@outlook.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] lisp/org.el: Obsolete `org-cached-entry-get' in favor of `org-entry-get'
Date: Wed, 01 May 2024 20:49:18 +0000	[thread overview]
Message-ID: <87v83xqmup.fsf@localhost> (raw)
In-Reply-To: <CH3PR84MB34249D84A8312F79536207C8C5192@CH3PR84MB3424.NAMPRD84.PROD.OUTLOOK.COM>

Morgan Smith <morgan.j.smith@outlook.com> writes:

> The comment written just above `org-element-properties-map' says this:
>
> #+BEGIN_SRC elisp
> ;; There is purposely no function like `org-element-properties' that
> ;; returns a list of properties.  Such function would tempt the users
> ;; to (1) run it, creating a whole new list; (2) filter over that list
> ;; - the process requiring a lot of extra consing, adding a load onto
> ;; Emacs GC, memory used, and slowing things up as creating new lists
> ;; is not free for CPU.
> #+END_SRC
>
> This implies that the function `org-entry-properties' is just a bad
> idea.  Although giving it an argument for WHICH does make it better.

That's my comment, so I cannot disagree.

> It seems like it's only used in about 4 places in our codebase so if we
> wanted to go further, we could potentially see more performance
> enhancements if we obsolete this function as well.
>
> I haven't really looked into it much though so I apologize if my
> analyses is wrong.  Which it definitely could be.

`org-entry-properties' is the only place where the logic to retrieve
`org-special-properties' is implemented. So, we cannot just obsolete it.
It should be a more extensive refactoring with factoring out the logic
for retrieving special property values.

-- 
Ihor Radchenko // yantar92,
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>


      reply	other threads:[~2024-05-01 20:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29  0:28 [PATCH] lisp/org.el: Obsolete `org-cached-entry-get' in favor of `org-entry-get' Morgan Smith
2024-04-29 16:58 ` Ihor Radchenko
2024-04-29 18:36   ` Morgan Smith
2024-04-30 10:20     ` Ihor Radchenko
2024-05-01 17:14       ` Morgan Smith
2024-05-01 18:43         ` Ihor Radchenko
2024-05-01 19:33           ` Morgan Smith
2024-05-01 20:49             ` Ihor Radchenko [this message]

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=87v83xqmup.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=morgan.j.smith@outlook.com \
    /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).