all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Timothy <tecosaur@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [ANN] An Org parser for Julia
Date: Thu, 02 Dec 2021 19:13:48 +0800	[thread overview]
Message-ID: <87r1avi7ir.fsf@localhost> (raw)
In-Reply-To: <87ilw7p9re.fsf@gmail.com>

Timothy <tecosaur@gmail.com> writes:

> I’ve actually had a brief look at my performance using my Emacs config file
> (which is ~10k lines). On this, my parser is about ~5x faster than org-element.
> On a smaller file like the project’s readme it’s closer to ~10x faster. I’ve
> also noticed that I can multithread the parsing, which produces a ~9x speedup on
> my computer. So, that would be ~40-90x faster than org-element. I have yet to do
> much profiling/benchmarking/optimisation though, I’m still in the “feature
> adding” phase. This means that it could well slow down as I add more for it to
> recognise, but there are probably also unrealised potential performance
> improvements.

I am wondering how you did the benchmark.
I just tried the following on my config.org
(https://github.com/yantar92/emacs-config):

cd path/to/OrgMode.jl
julia1.6
push!(LOAD_PATH, pwd())
using OrgMode
orgfile = open("/home/yantar92/Git/emacs-config/config.org")
textorgfile = read(orgfile, String)
parse(Org, textorgfile)

The config.org is about 18k lines, but I did not manage to wait enough
for the parser to return.

Multithread looks promising though.

Also, the tests I mentioned are with my latest commit for
org-element-parse-buffer and on native-compiled Emacs.

>> Maybe we should implement a Elisp LSP server instead of many individual
>> parsers in different languages?
>
> For the sake of tools that operate on Org files, not just the Org editing
> experience, I think it’s quite good if we have a selection of /good/ parsers
> available for different languages. However, I also think an LSP server would be
> good. That’s why I have <https://github.com/tecosaur/org-lsp>, even if I haven’t
> spent anywhere near as much time on it as I would like (it’s barely a skeleton
> at the moment).

Thanks for reminding about this. I have seen it, forgot it, and now
reinvent the idea :D.

Also, it would be great to have a unified test set to verify third-party
parsers and org-element parser.

>> tree-sitter vs. org-element on 15M Org file
>
> Might you have a link to this file? I’d be interested to try it.

That's my personal notes file. I can test it for you if you give me the
instructions.

Best,
Ihor


  reply	other threads:[~2021-12-02 11:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02  9:06 [ANN] An Org parser for Julia Timothy
2021-12-02 10:11 ` Ihor Radchenko
2021-12-02 10:30   ` Timothy
2021-12-02 11:13     ` Ihor Radchenko [this message]
2021-12-02 11:20       ` Timothy
2021-12-02 12:07         ` Ihor Radchenko
2021-12-02 12:11           ` Timothy
2021-12-02 12:18 ` Eric S Fraga
2021-12-02 14:04   ` Timothy
2021-12-02 15:56     ` Eric S Fraga
2022-09-25  8:02 ` Bastien

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=87r1avi7ir.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tecosaur@gmail.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 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.