From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aCkMF2KqqGFnIgEAgWs5BA (envelope-from ) for ; Thu, 02 Dec 2021 12:13:38 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id S1HHEmKqqGFbUwAA1q6Kng (envelope-from ) for ; Thu, 02 Dec 2021 11:13:38 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F2D723FADD for ; Thu, 2 Dec 2021 12:13:37 +0100 (CET) Received: from localhost ([::1]:47420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msk1x-0006X3-4u for larch@yhetil.org; Thu, 02 Dec 2021 06:13:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msk0p-0006Wh-DE for emacs-orgmode@gnu.org; Thu, 02 Dec 2021 06:12:27 -0500 Received: from [2607:f8b0:4864:20::633] (port=33786 helo=mail-pl1-x633.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1msk0n-0006aY-3F for emacs-orgmode@gnu.org; Thu, 02 Dec 2021 06:12:27 -0500 Received: by mail-pl1-x633.google.com with SMTP id y7so20016080plp.0 for ; Thu, 02 Dec 2021 03:12:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=osD5+jgqpH10Qz4t4zKzVee5JFKms9Wlhh2sSa2+/O0=; b=XmGPUQ3capVBp1gr/Lvt0UYDytjW3s6TxxBYAhgIh5bykJ/SF5YGxGCd1wmctBkNf6 o+2wS7uML6uZ6TrQvw7dgEY91W5/GQTZM4+IcpNT+yagS93ZCIn5C2nKGQ3aSmHbOsrw d+6/eXbyjKxN5bYWj7B3YsqozqbDWtSnYgqHElGYm7Cx2tUTZkN9RnjfyXOXwwe4FZ86 q9drEsFytbyxKxcKl5DsQIFZfWEj/7HF/zyQuiSo2u+5odiM3GgBlMGD0kPyCeVksXg9 k9qvTeZozSuualvqpMmyQCJwS+bP94ZOMc5XM3yrXA6MIh2NAPYoZbPzHYIpmMoguLmg TLkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=osD5+jgqpH10Qz4t4zKzVee5JFKms9Wlhh2sSa2+/O0=; b=iLIHcILvtdFtOQXXisQzHefjW1HX32Q4PEpUys55dHrxZ4VBcVx38CbaCjjr1q0DrD 53QHtHPzhFtv5FAj6wlicET9l4kT8s14db9Yo3OddnBceN0DH8Q35c64QiV2a46wh3RT GFgnrsuQhP5h+fXTULrB31Hqfj5nFb/r1601ZA2cKCZ6rjQqqqqmNp9V3p3iR0hBN7AH kqYkbNEqRzDEnc79n0yYACh6ZbM9bbr+zryxhPNZ/OvzZjwOsSohj5yY3XARf4ZaZRnH DCM3PS80nWrxiCyMK062VQDjn3T1VpmKBXZPMtvy3sbPr82vN9Zjv0s10wdDLlFbHJkN +vEQ== X-Gm-Message-State: AOAM532Jj6qJJQAfoyTt9INtMoR0Vm7VhKXGBnwOodMdwDL1PyKmN2HM Fg3Ffcxbr8MqqAvLr4dmVcU= X-Google-Smtp-Source: ABdhPJzF1ZlTZyLegEVsRxClBxBjLX9Zcv2E8kqs1PijgbjYMRSR4U+gXWb0uFsC/9Fiz9TwBfaO7w== X-Received: by 2002:a17:90a:df88:: with SMTP id p8mr5396040pjv.32.1638443543655; Thu, 02 Dec 2021 03:12:23 -0800 (PST) Received: from localhost ([103.125.234.161]) by smtp.gmail.com with ESMTPSA id g5sm2215086pjt.15.2021.12.02.03.12.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 03:12:23 -0800 (PST) From: Ihor Radchenko To: Timothy Subject: Re: [ANN] An Org parser for Julia In-Reply-To: <87ilw7p9re.fsf@gmail.com> References: <87o85zpdi8.fsf@gmail.com> <87k0gn71uz.fsf@localhost> <87ilw7p9re.fsf@gmail.com> Date: Thu, 02 Dec 2021 19:13:48 +0800 Message-ID: <87r1avi7ir.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::633 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=yantar92@gmail.com; helo=mail-pl1-x633.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1638443618; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=osD5+jgqpH10Qz4t4zKzVee5JFKms9Wlhh2sSa2+/O0=; b=Vvbm1Fubt4C/TOd7q9UgntmpT7UCR4tMfRXUnV/Bsx0Pxvut5b/4hbWAlBprE62yRyWcDQ jc6dar0N/iTe56TB8oDF4DkvADhAsqnUnKEsPFzEJ8WPF0AAYK8ErHNQS3f2bu9nDG4/R9 M2NokKK3ecy4Y4QgyAQ5F82z+jxdxgc9NkCjhn/zVfoKUefOkcowLioKJsgpPyI0KnusGC HF7N+ByIqFewEW5LT+KYMvbiXcuVL/FDR31xZ8vTPjft1c87Xs8M8qDpTVwhAExJh6w+BP 3m10GrYUAoawP4qqdHnCD5qwLrGcvaS+NW0ImjPt396gZsn21mfNcgHKi73cKg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638443618; a=rsa-sha256; cv=none; b=STZgzQSIJ48hvIoEO9R9CIjI65opnnGSL/s0ZoMTVQ2650aa3pji46miRsOIQpemS+XgIF uQSvZ228LO+mbMQUEF4HrNcl50gS5kc4mLMZd0jmPdGrh8CbsVY6A1GFP2mr9ERRxQPdqZ wYefaLdl8kHhJjAjzZRlZflcgBqeHZNRoxFD92THcWNIc/+CY52QHKkaflaNh5CbHRHIcd yuw65M5OYVQF6vBBQuE+sMEB6hLNqagYAb8uaHahDukHCOcN6EjHF892qjn22UchnEdN7D J5RgbxJf89oEtEZr/tYxBlqK/f57UJzpcqNDvjMx5kuNlxYtY1+rLSrr3fq1hQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=XmGPUQ3c; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.62 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=XmGPUQ3c; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: F2D723FADD X-Spam-Score: -3.62 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8ULSNovEj8F8 Timothy writes: > I=E2=80=99ve actually had a brief look at my performance using my Emacs c= onfig file > (which is ~10k lines). On this, my parser is about ~5x faster than org-el= ement. > On a smaller file like the project=E2=80=99s readme it=E2=80=99s closer t= o ~10x faster. I=E2=80=99ve > also noticed that I can multithread the parsing, which produces a ~9x spe= edup on > my computer. So, that would be ~40-90x faster than org-element. I have ye= t to do > much profiling/benchmarking/optimisation though, I=E2=80=99m still in the= =E2=80=9Cfeature > adding=E2=80=9D phase. This means that it could well slow down as I add m= ore 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 =3D open("/home/yantar92/Git/emacs-config/config.org") textorgfile =3D 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=E2=80=99s quite good if we have a selection of /go= od/ parsers > available for different languages. However, I also think an LSP server wo= uld be > good. That=E2=80=99s why I have , ev= en if I haven=E2=80=99t > spent anywhere near as much time on it as I would like (it=E2=80=99s bare= ly 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=E2=80=99d 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