emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Timothy <tecosaur@gmail.com>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [ANN] An Org parser for Julia
Date: Thu, 02 Dec 2021 19:20:01 +0800	[thread overview]
Message-ID: <87h7brp7gz.fsf@gmail.com> (raw)
In-Reply-To: <87r1avi7ir.fsf@localhost>

[-- Attachment #1: Type: text/plain, Size: 2447 bytes --]

Hi Ihor,

> I am wondering how you did the benchmark.
> I just tried the following on my config.org
> (<https://github.com/yantar92/emacs-config>):
>
> The config.org is about 18k lines, but I did not manage to wait enough
> for the parser to return.

Hmm, I just tried yours and I think something in your file is causing it to trip
up. Not sure what though, further investigation is required. For this alone I’m
glad you’ve shared this with me :)

For reference, this is what I’ve been doing:
┌────
│ julia> using OrgMode
│ 
│ julia> config = read("/home/tec/.config/doom/config.org", String);
│ 
│ julia> @benchmark parse(Org, config)
│ BenchmarkTools.Trial: 139 samples with 1 evaluation.
│  Range (min … max):  34.042 ms … 43.269 ms  ┊ GC (min … max): 0.00% … 16.10%
│  Time  (median):     34.857 ms              ┊ GC (median):    0.00%
│  Time  (mean ± σ):   35.999 ms ±  2.490 ms  ┊ GC (mean ± σ):  2.63% ±  5.30%
│ 
│     █▁
│   ▃▇██▄▆▄▃▂▃▅▅▅▄▄▂▂▂▂▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▂▂▃▁▃▂▂▃▂▃▁▁▂▃▁▂▂▁▂ ▂
│   34 ms           Histogram: frequency by time          43 ms <
│ 
│  Memory estimate: 7.17 MiB, allocs estimate: 142185.
└────

It’s worth noting that the first time `parse(Org, config)' is called, it will
trigger JIT compilation (which for me takes ~15s).

`org-element-parse-buffer' seems to tend to take ~200ms.

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

I’m on native-compiled Emacs, but ~12 commits behind.

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

I’m just hoping I’ll get to it / get help eventually 😂.

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

You know, I’ve had the same thought 🙂.

>>> 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.

Cool, since your config seems to have revealed some issues, it would probably be
worth waiting till I’ve sorted that out.

All the best,
Timothy

  reply	other threads:[~2021-12-02 11:33 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
2021-12-02 11:20       ` Timothy [this message]
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

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