[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ANN] An Org parser for Julia

From: Timothy
Subject: Re: [ANN] An Org parser for Julia
Date: Thu, 02 Dec 2021 19:20:01 +0800
User-agent: mu4e 1.6.9; emacs 28.0.50

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,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]