From: Ihor Radchenko <yantar92@posteo.net>
To: Richard Lawrence <rwl@recursewithless.net>
Cc: emacs-devel@gnu.org
Subject: Re: Improving Emacs' iCalendar support
Date: Fri, 25 Oct 2024 18:59:38 +0000 [thread overview]
Message-ID: <87msisqa91.fsf@localhost> (raw)
In-Reply-To: <878qucxs1s.fsf@ohm.mail-host-address-is-not-set>
Richard Lawrence <rwl@recursewithless.net> writes:
> Can you tell me a bit more about the performance benefits? Do these
> mostly just stem from the use of an array for :standard-properties?
:standard-properties and lazy evaluation.
> (You get this for free with cl-structs, too.)
Not exactly for free. There are extra type checks in cl-structs, and they
are slower to create. I did the benchmarking and decided to go with less
sophisticated data structure supported by inlined accessors/setters.
Also, as a technical detail that is irrelevant to your case, I had to
preserve backwards compatibility with the existing design to the highest
extent possible.
> ... Or is it more about when
> and how parsing happens? (This is something I feel like I've never
> grasped in org-element...in the past I've been confused because the
> properties I'd see when calling e.g. org-element-at-point would be
> different than the ones available in some other context.)
org-element-ast has little to do with parsing details. However, it does
provide features we need during parsing: (1) storing arbitrary
properties in addition to "standard"; (2) supporting "plain string" as a
special variant of AST leaf; (3) supporting anonymous nodes - simple
list of AST nodes; (4) lazy evaluation of properties - org-element uses
the APIs from org-element-ast to defer large parts of parsing to when
the relevant part of the AST node is actually requested by a caller.
For org-element-at-point, you may be confused because Org parser can
work in several modes, parsing down to certain
"granularity". org-element-at-point usually limits itself to parsing
down to paragraph level (in particular, it does not parse markup
inside headline :title leaving it as a simple plain text leaf), while
what you see during export is the most complete parsing mode, reaching
down to markup (in headlines, :title then contains a collection of Org
"objects" - the markup is parsed). This has nothing to do with the AST
layout.
--
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>
next prev parent reply other threads:[~2024-10-25 18:59 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-18 9:01 Improving Emacs' iCalendar support Richard Lawrence
2024-10-18 9:24 ` Eli Zaretskii
2024-10-19 8:22 ` Richard Lawrence
2024-10-19 10:11 ` Eli Zaretskii
2024-10-20 5:08 ` Richard Lawrence
2024-10-20 5:21 ` Eli Zaretskii
2024-10-18 12:58 ` Sebastián Monía
2024-10-19 8:28 ` Richard Lawrence
2024-10-19 5:44 ` Adam Porter
2024-10-19 8:39 ` Richard Lawrence
2024-10-20 3:09 ` Adam Porter
2024-10-22 18:40 ` Ihor Radchenko
2024-10-23 7:29 ` Björn Bidar
[not found] ` <87plnr6zvk.fsf@>
2024-10-23 8:09 ` Ihor Radchenko
2024-10-23 9:05 ` Richard Lawrence
2024-10-23 10:03 ` Björn Bidar
2024-10-23 9:01 ` Richard Lawrence
2024-10-23 20:24 ` Ferdinand Pieper
2024-10-24 14:52 ` Richard Lawrence
2024-10-24 17:45 ` Ihor Radchenko
2024-10-25 12:53 ` Richard Lawrence
2024-10-25 18:59 ` Ihor Radchenko [this message]
2024-10-21 6:10 ` Björn Bidar
2024-10-21 6:22 ` Visuwesh
2024-10-23 9:15 ` Richard Lawrence
2024-10-23 9:45 ` Visuwesh
[not found] ` <87wmi29eaf.fsf@>
2024-10-26 17:49 ` Ihor Radchenko
2024-10-28 10:44 ` Björn Bidar
[not found] ` <87r080tslf.fsf@>
2024-10-28 19:09 ` Ihor Radchenko
2024-11-23 8:44 ` Richard Lawrence
2024-11-24 9:50 ` Eli Zaretskii
2024-11-24 10:21 ` Ihor Radchenko
2024-11-24 10:41 ` Eli Zaretskii
2024-11-24 10:58 ` Ihor Radchenko
2024-11-24 11:08 ` Eli Zaretskii
2024-11-24 11:21 ` Upstreaming org-element-ast (was: Improving Emacs' iCalendar support) Ihor Radchenko
2024-11-24 12:55 ` Eli Zaretskii
2024-11-25 9:09 ` Improving Emacs' iCalendar support Richard Lawrence
2024-11-25 12:42 ` Eli Zaretskii
2024-11-25 13:03 ` Rudolf Schlatte
2024-11-25 13:36 ` Eli Zaretskii
2024-11-25 17:14 ` Richard Lawrence
2024-12-20 13:21 ` Richard Lawrence
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87msisqa91.fsf@localhost \
--to=yantar92@posteo.net \
--cc=emacs-devel@gnu.org \
--cc=rwl@recursewithless.net \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.