From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CBXEIwYYR2FbBQEAgWs5BA (envelope-from ) for ; Sun, 19 Sep 2021 12:59:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id QJl/HwYYR2GMMgAAB5/wlQ (envelope-from ) for ; Sun, 19 Sep 2021 10:59:18 +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 0C54916D7C for ; Sun, 19 Sep 2021 12:59:18 +0200 (CEST) Received: from localhost ([::1]:58584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRuXU-0002Dw-0b for larch@yhetil.org; Sun, 19 Sep 2021 06:59:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRuWz-0002DZ-EN for emacs-orgmode@gnu.org; Sun, 19 Sep 2021 06:58:45 -0400 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]:41576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mRuWx-0008Qe-TD for emacs-orgmode@gnu.org; Sun, 19 Sep 2021 06:58:45 -0400 Received: by mail-pg1-x535.google.com with SMTP id k24so14477338pgh.8 for ; Sun, 19 Sep 2021 03:58:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:references:user-agent:in-reply-to :message-id:mime-version; bh=9Q3lQXAICmdCG73jElRl83i9IPPgxe5FM+CiFJVsBlc=; b=KSWtOF4mnOchuSqeazpCACfAscQm/Mk12hV2gt13oCm+SVV5lJZYCWorFo6Q7OMM8s EHM5ood7myw1Ji6c2JvitiZNsNLBiuq631XDGlcd7nqYmy/QzDdA4CA/HDLoYHWJtpdx o75tj7RoQjvNsOmfIm40zNdMQsSKMaquHQ0n+Gd17nM2twkfw2p6ZDXkUKplXQiebOuf bxmkGXFmKtkftQstk47GXG7wj8eDHiODmvFN52BumWQiGdJdYUAbakF+JTVVWQ+Bi0KU WRTedApBB6HRJLmamKNHzx6DF2enG86oZBu0nbQnfsIwI1HjEso6t6ndeXCN5vwdgAsC n5gg== 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:date:references:user-agent :in-reply-to:message-id:mime-version; bh=9Q3lQXAICmdCG73jElRl83i9IPPgxe5FM+CiFJVsBlc=; b=prBqybO5Ow10DMzrcc68dTmInc4pb5w5EKWnXsCcIzqx3RkzreNcjZUKzfqZIAZGDV aYUI7FSmul/71+c9wxNOhTVCwsI9exD1G8s+8qbv658Wk3SGr6+X9WKr0Ol6u8AV+tg7 IrXMK1mBjJCuZ6ASZNdZ8M7YMVQq90yAY2El+DjRYMHxUu++io2QPEXIFtAiNUqweVS5 VMhqTL9pe6dGvUDxSXrwQuzsFTpNjX0Buta5daqxfJ+W8GKLECAMKzEGUIXX1nlZ5xQ2 PVNucaA15hCT6+LIrHh79GPyasiu8xVPA5cRnHN7Qy3inWl2w0Jqe8qoHsct4WDPUC+q i7ag== X-Gm-Message-State: AOAM532PiM9aFl6ImUahbnK9RBifKtLerX2P0lKt0qG/hW8qlvPjhZ9n YPBql2rz08/qeSwhZ6rA+wE= X-Google-Smtp-Source: ABdhPJyQvJ8ELuAYaCPlGTSGn/GHVMvCTd1uMTVF29eTzYdb4kPVc78jGyPYLfXJZzGjN6v/WIGOtA== X-Received: by 2002:a62:1d10:0:b0:408:9989:3c88 with SMTP id d16-20020a621d10000000b0040899893c88mr20095250pfd.22.1632049122530; Sun, 19 Sep 2021 03:58:42 -0700 (PDT) Received: from localhost (61-245-128-160.3df580.per.nbn.aussiebb.net. [61.245.128.160]) by smtp.gmail.com with ESMTPSA id n9sm11021892pff.37.2021.09.19.03.58.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Sep 2021 03:58:42 -0700 (PDT) From: Timothy To: Ihor Radchenko Subject: Re: [feature proposal] Headline caching via org-element-cache = up to 2.5x performance boost Date: Sun, 19 Sep 2021 17:58:30 +0800 References: <87bl4p6n0m.fsf@localhost> User-agent: mu4e 1.6.5; emacs 28.0.50 In-reply-to: <87bl4p6n0m.fsf@localhost> X-Woof-Patch: confirmed Message-ID: <87a6k8esrl.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::535; envelope-from=tecosaur@gmail.com; helo=mail-pg1-x535.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632049158; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=9Q3lQXAICmdCG73jElRl83i9IPPgxe5FM+CiFJVsBlc=; b=XD/mJ0w2l7i0e4P9Z9mL1+pb8KkM9SShWHbHjKrKHYC+pYrHi63CaRyRLYFDwAQ2eL0Lp1 cdKiWWLlCz+ywGU9bNoymj9pxIUwLkkdyIZR+4G/o4MFwKXdubhd6ZrZylgI47nmGiIO3U B4XNmnXymhXe1wmJFpe55TieLRfPmBn4oJc0Br9JVj+xU3Qt+8aZP63ioLhCWjm9FSsz6G 8e7cqQnkIo28rF5BuI3ARJDapx+9F149aDcc3fbwiqfW9+9wWjYSL3UepRwNe75BhF9TuK +Qt4wvUuaSFr29EkMSS1VWkFgQvCwwQtYOvmW/Lh46uDKuzMKqYqVmjRAwXv7w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632049158; a=rsa-sha256; cv=none; b=egievq2g2IgoHVqE0oy6bhrwmiO5afEibN5HMYVoRbBQsJdFqz22O8jfWDiwaIeSpssQit 9MGDIZMFJ9ZFe0o1TkXgUweU0pAHevi4LDTojrUxzLZDFTZgQdJ5f0OTVj5l4E0ee5sc1H NV7gNagZuXACnGXyrGWbvikVyUc/yuxbZBaf1ZfqQv5zpG0g2FX0SkeL8XMxck14lJdH/T 9hMHxby5VlAOOUs+7fQ8SRrMM1fNCf/mwVSopdG3e8Ly1mNb5SPrDiY2eJyfS5PhtgQ2OK U/JXtzK/4szxzFp54UTWJYxc5rVgD4NrvPo5k6c/J6HqSbgiwHyRYU3Q0i6X1w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=KSWtOF4m; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.09 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=KSWtOF4m; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 0C54916D7C X-Spam-Score: -2.09 X-Migadu-Scanner: scn0.migadu.com X-TUID: ZWPbUnnDXrJD --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Ihor, I=E2=80=99ve just read through your description, and this sounds very promi= sing! Many thanks for going to the effort of tracking down this performance issue and /actually making a patch to address it/. As someone who tangles massive literate config this sounds like it could ma= ke quite a noticeable improvement. To test this, do I need to do anything more= than just apply your patch? > I would like to propose adding support of storing headlines in > org-element-cache. > > Currently, org-element-cache only stores elements within individual > sections. Storing headlines in cache would open various possibilities to > improve Org performance: tag inheritance, property inheritance, category > queries, id lookup, refile targets, agenda views, etc could all make use > of cache. > > I am not proposing a mere idea, but have an actual working (WIP) code > in: . Also, I am attaching a reference > patch for org-element.el (the actual branch contains more changes). All the best, Timothy p.s. I=E2=80=99m marking this as a patch on the tracker, since it is one :P --=-=-=--