From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4JGqFfHSLWO++gAAbAwnHQ (envelope-from ) for ; Fri, 23 Sep 2022 17:38:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id gGW0FfHSLWOclwAA9RJhRA (envelope-from ) for ; Fri, 23 Sep 2022 17:38:25 +0200 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 C7F03AA50 for ; Fri, 23 Sep 2022 17:38:24 +0200 (CEST) Received: from localhost ([::1]:35340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obkkx-0007M8-19 for larch@yhetil.org; Fri, 23 Sep 2022 11:38:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55390) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obkiI-0005Wo-LA for emacs-orgmode@gnu.org; Fri, 23 Sep 2022 11:35:40 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:41552) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1obkiD-0003eB-S1 for emacs-orgmode@gnu.org; Fri, 23 Sep 2022 11:35:35 -0400 Received: by mail-pg1-x532.google.com with SMTP id q9so567235pgq.8 for ; Fri, 23 Sep 2022 08:35:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date; bh=HHGcMZKyO797tUYwQnvXEGesQWog2al/fEyrBvKthDk=; b=gxhGE2b2WilmbjC66PHNw49BdBIcmILemThFJ+WlywVT+AlliE9zCYEDl7H8/mzOU8 lKNbGQa+La6EKCBDzJKxRbc++C/QeivwLIcd+8gCvmv1SyntbhjJ55fkF/38SVl4fBjf tzNdNEgs47lcWnnibF8nl28xCHWurtBP7LFINi56dDQRTZwLrAPxfpZ0jMi5RRS3o4Lf T6iVGwtFIFBm6KRvZe/zJ6wjkQM5zLadrNGOwBGIM7uQBLf6a/S398W+zYaK+kKCTKOU Y+U/TTBeScjLW/gXUzcj26WnJr6nfAZb69tLQ7aXBPcxYDbTPGgJ/s+iqKJOgMD9Z5FB tszg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=HHGcMZKyO797tUYwQnvXEGesQWog2al/fEyrBvKthDk=; b=KvXq8DeDtAIfuTqvQEcBQX0UMljGAuq8NRduEVePlBUngu9oYeXJg5N6l7zWpm7No6 pTpxvX2CW1ZzkZ8Lp8lquT9eHnTZZhKWAkU4SEP0H3IXgTrq3exi5APiU7Apn7ZmDgqU eOtjW/oPqwtWnxNEjBjoS4++ExEOE9fazi/UqLwLFoAUqeRR9VKujFutXAOgUR6lqQgA MHEwc/qawjIwVS/rCxP5WJbTMmW94eFoG8PSZmtZLzP0AKXLYqNXht1B4K1ntf2SvFRN FY+jcLJ0WTogHXOUR1t8ELNzG9sUouJMEehzZnDcTheCFCNr+ng+y6+SdyaJ/Ov8NXPv BrcA== X-Gm-Message-State: ACrzQf3WjY4HPsRpM6B1z0GhglMxsatokr1GF0De3PvJsKWsXkOPKtpx 7uQyJGLSz8tuRQJC30pmJ5c= X-Google-Smtp-Source: AMsMyM7q5hv3xhaD1jIyNOqyqbt8AcgmDEcESWWBgQUpVrpseIzaWMa94lQuMA/1r+5Ck6GWTqGhTw== X-Received: by 2002:a05:6a00:1c72:b0:543:239c:b602 with SMTP id s50-20020a056a001c7200b00543239cb602mr9714754pfw.75.1663947332355; Fri, 23 Sep 2022 08:35:32 -0700 (PDT) Received: from localhost ([2409:8970:a80:3a4:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id f17-20020a170902ce9100b001786b712bf7sm6230220plg.151.2022.09.23.08.35.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Sep 2022 08:35:31 -0700 (PDT) From: Ihor Radchenko To: =?utf-8?Q?andr=C3=A9s_ram=C3=ADrez?= Cc: emacs-orgmode Subject: Re: [BUG] org-agenda-list takes 4m compared to 27 that took 15 seconds [9.5.2 (release_9.5.2-25-gaf6f12 @ /usr/share/emacs/28.1/lisp/org/)] In-Reply-To: References: <87v8poszqb.fsf@localhost> <87tu52z3j6.fsf@localhost> <8735cmyx0s.fsf@localhost> <87zgetxrjo.fsf@localhost> <87o7v8jd8r.fsf@localhost> <87bkr694et.fsf@localhost> <878rma930f.fsf@localhost> <875yhe8yjv.fsf@localhost> Date: Fri, 23 Sep 2022 23:36:18 +0800 Message-ID: <871qs23xxp.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::532; envelope-from=yantar92@gmail.com; helo=mail-pg1-x532.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, 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.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1663947504; 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=HHGcMZKyO797tUYwQnvXEGesQWog2al/fEyrBvKthDk=; b=le/5C+ifUplNXJG8A3lXp+wsv5BfEwuJ+WH2bFxyk33cNqZ2Hfxw8zIhLLbLhwTnWR65sM c7YkiH7IcmfV4giOLKa+9uxEqrs5esRzOepAG7k4D9kjijCtcx2a6oy1tIfjxC8KYePYyX udOA2OBHerAhguizQ591ystTJrj9jQhOB5b9YxpyJTMDO/eM6zjbyr5XXJaYXzYJCa4yMm JTg+IFX5LrEWzRbVcytIV14vMWF+0TstjsrALXUi17sfEgUmEv5lAdcScHoCcOmWx0Uc4C yEIgakSLbHt4VVjbxKQpw0LrBWkhJyRi6aG9BXubCSQXWgR6llKc10QEe4iXhw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663947504; a=rsa-sha256; cv=none; b=nEHGS+t9C5sc2uQmHxVUbJRru0kTKgT8/wQmo9pm9OO6rB/8W9fvnEXZz1IUXpBcI1qv7W eDgb/I4bwO5GkNrLx5GigJXq2P8M3uKNVMO/E9G3LYbMxLEQ8uR3mu4emNm5t+MnQCMfbh uJz5yAqOU49Ye2LfnK4P5+pmvcEWBHUA/QO3Ln/G27FnEHLOIzHWLebz6EmKXf8hRJVBkW MYrAgVUbPst+meDktdJYN/jW1RBtYiHWihqrA4R0mZwDNGW/9yw7esP46flAsRgu2Xixku npvzcTTFyrecVe8rFFgRl8567f0skqooXm4KAiwGN2VyKKNEX2OPKUtqjRxTkQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=gxhGE2b2; 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.35 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=gxhGE2b2; 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: C7F03AA50 X-Spam-Score: -3.35 X-Migadu-Scanner: scn1.migadu.com X-TUID: V0xGqDsLipF0 andr=C3=A9s ram=C3=ADrez writes: > Ihor> Can you update and try the profiling again? > > Done. Thanks! I can now see that matching sexp entries is properly cached. > Ihor> (If this last change works, I am out of ideas about easy ways t= o improve performance > Ihor> further. The only one is a significant change in org-element-at= -point internals, but it > Ihor> will need to be tested carefully, and I do not plan to upstream= it before the next Org > Ihor> release). > > Do not worry. You have done more than enough. I have notice this delay > from a long time. But nobody else reported it, which is weird. I am > going to wait until emacs-29, for those changes. You appear to have a large number of diary-style timestamps. This is not common. Normal timestamps are generally much faster because we can construct a matching regexp based on current agenda date instead of checking every single sexp. Having said that, I now have an idea how to avoid the overheads in such scenarios. Just pushed the change upstream. Can you check? It should bypass most of the slow checks in your use case. > Is there any workaround or recomendacion for the emacs-28 users with the > built-in org mode?. > > Or that should be mentioned on PROBLEMS? We have a whole dedicated section in the manual: "A.8 Speeding Up Your Agendas". Agenda performance is a well-known problem since years back. The coming release (the current main branch) will have major improvements to performance in this area, although I have mostly optimized it for timestamp-based agendas and todo agendas before your report. --=20 Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92