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 4NDdKqy4oGCaJQAAgWs5BA (envelope-from ) for ; Sun, 16 May 2021 08:16:12 +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 AAF+Jqy4oGDBfQAAB5/wlQ (envelope-from ) for ; Sun, 16 May 2021 06:16:12 +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 04817109FF for ; Sun, 16 May 2021 08:16:12 +0200 (CEST) Received: from localhost ([::1]:43072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liA4Q-0002aq-52 for larch@yhetil.org; Sun, 16 May 2021 02:16:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liA3X-0002aS-UF for emacs-orgmode@gnu.org; Sun, 16 May 2021 02:15:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42254) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liA3X-00073L-Ln; Sun, 16 May 2021 02:15:15 -0400 Received: from [78.194.183.21] (port=45306 helo=guerry) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liA3X-0001eQ-G3; Sun, 16 May 2021 02:15:15 -0400 Received: by guerry (Postfix, from userid 1000) id 889A41A60E70; Sun, 16 May 2021 08:15:08 +0200 (CEST) From: Bastien To: Ihor Radchenko Subject: Re: [PATCH] Use cache in org-up-heading-safe In-Reply-To: <874kfieduh.fsf@localhost> (Ihor Radchenko's message of "Tue, 04 May 2021 23:08:22 +0800") Organization: GNU References: <874kfieduh.fsf@localhost> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Sun, 16 May 2021 08:15:08 +0200 Message-ID: <87pmxr5hn7.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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=1621145772; 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; bh=kftv5o41V/nR3zFhqIe21gCcuQGCAM68XNj1XWI6Tuw=; b=dQVKvWVEi3iyngOJPVQBaaAbh8ul7S7GOGEa0VS1Y6cy4ja8fZhx2JWI5+jyjU8Bc0WZSs jXnF7LVBh6BvXGY7U3yfWVWrPUBxidU0YXLm97++IHUKYQuBmyNVJLALedmY4UxF49GGWM RUgHdQ/lKMJTfWSROXbd7pbm2/AHGK7IpnY/LgyX50gm0yYYYjpRKNiBdjf+t9DlInaog6 +ao9XaH+3NkmyPBx0INRyaDx/1POpbIArQ/9IORCQNdMhylxt+RE1b/G2ySmPh0XjCv5BT MJHR7GVL9gbXSFK4k3XQ9yVa4HGqp1rXOtgA8S6/Wg3b7KFyTv7QL30z5Tda0A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621145772; a=rsa-sha256; cv=none; b=hRrxv9o+Vv5WC6yC5u6IxzJIsXuNxu23Aajj0fr60T9VAyHkcIIAr/CmVjHWuqdVZlyCex +uTcndTaf1TUIuaQjxfc/TxZheK9j9YqhEB1eaY1UnPSGRJTNUyj6OT7UC6Eqswa6qrrI3 8HDeZ7tUvxII7gu7w9y/kPY0JL/yKUPWC7tpGJ+ulp18/m9JmbSP7Y4Jvxv1DKD4H4xsUF 4y2XxyfQT/ysdbRsF0ZPKa1R+J9PDgJVev5wV+IMEndbhBVuYrJzW6INbknIhYFjlAVJJ+ Bzu7M1So3I0oxloSECkzjKrDNxq+3rzm4YIPBhmLULHmexBooraa7MGOBM3zyw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: -0.45 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: 04817109FF X-Spam-Score: -0.45 X-Migadu-Scanner: scn0.migadu.com X-TUID: 97wFubH+lFCV --=-=-= Content-Type: text/plain Hi, Ihor Radchenko writes: > While testing another patch for agenda fontification, I noticed that > agenda can spend up to half!! time doing org-up-heading-safe. Mostly > inside queries for inherited tags and properties. I encounter a bug with this cache, it seems the buffer-local variable `org--up-heading-cache' is not initialized in every buffer from which org-agenda-list might need it. I'm attaching the bugtrace. Ihor, do you see what's happening here? -- Bastien --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=bugtrace.txt Debugger entered--Lisp error: (void-variable org--up-heading-cache) org-up-heading-safe() org-block-todo-from-children-or-siblings-or-parent((:type todo-state-change :position 20793 :from todo :to done)) org-entry-blocked-p() org-agenda--mark-blocked-entry())) org-agenda-finalize-entries((... ... ... ... ... ... ... ... ... ... ... ... ... ... ...) tags) org-tags-view((4) #("+Code+TODO={NEXT\\|STRT}" 11 23 (regexp t))) #f(compiled-function () #)() funcall(#f(compiled-function () #)) (let ((org-agenda-category-filter-preset '("-ETL"))) (funcall '#f(compiled-function () #))) eval((let ((org-agenda-category-filter-preset '("-ETL"))) (funcall '#f(compiled-function () #)))) org-agenda(nil "cc") (lambda nil (interactive) (org-agenda nil "cc"))() funcall-interactively((lambda nil (interactive) (org-agenda nil "cc"))) command-execute((lambda nil (interactive) (org-agenda nil "cc"))) --=-=-=--