From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id OMf6APLFMGbbLQEAe85BDQ:P1 (envelope-from ) for ; Tue, 30 Apr 2024 12:20:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id OMf6APLFMGbbLQEAe85BDQ (envelope-from ) for ; Tue, 30 Apr 2024 12:20:34 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Yohs6kzP; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1714472433; 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=XTMURRWuK1rkk/tB6xIw+VtInWb2K1D85X8LJ/xLKXY=; b=huA1POInuSw0m6NWJxrbdTvflmTzclGe+JJCAy2D/RYpdStejLkkmziiW77ATzD/XTrs0v 5vtBzFYSaJmBAeOeIRaoIzTy+zdr1mE1lIAZ+34/oHk7PoI54Q6fHKsQszd6flgYJWEtYr oQYrL/UvSDrqFsqoaLA+348d7x7aYP1IJ96hH+G1I+D5gmJiSaVKZUvIqs/Nhd9Miw7qAf JvEFrZ2wZLpSeK4ft/MufpVTei5McIWYYoqHKTc9IjKUnm4bIL2DxPs6AT8UAvOfp8ljOm 7Xh6jEjlXLxTc6XTeauBO0j0tFuuPFYMT47e3kVzE8jiAuCEPjPFR8ICIfA/Zg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Yohs6kzP; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1714472433; a=rsa-sha256; cv=none; b=itl8aNST5oDfXgxVZqQoOkoBZJIqhkzZyFTS5CJ2eXrA4fRl9IaioKhw11bZCHoYWeMNf9 euEz0PtvJwfwgKH/n4+dFCPa5XPjTGKIC3XFQgr5pARoktjVarJSpbmqTPQdrzzmJWwTG3 EvzZMNEmmxCV3Yu60D4xS2GQBp1NeNhu6d+LOryiz8zOv728bZ1etsbhL3lb9PgO04ii1x ZcZEqtGbeoqZKkyt4bLhv/R5fLadXfE+YGEQdmzHODuXUEL2jRTtCFNMOmT95qBi79BRbc J4IuuFbDaAuOFgaRz8yEbw3NNj0H/PL9560lKl3l03/cz6lF5w+A74a7viOmtA== 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 A5AA453637 for ; Tue, 30 Apr 2024 12:20:33 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s1kaD-0000E5-RB; Tue, 30 Apr 2024 06:19:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s1kaC-0000CX-L2 for emacs-orgmode@gnu.org; Tue, 30 Apr 2024 06:19:32 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s1kaA-0003SK-2R for emacs-orgmode@gnu.org; Tue, 30 Apr 2024 06:19:32 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 2EF25240103 for ; Tue, 30 Apr 2024 12:19:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1714472366; bh=XC0KIaDxLsh7Z31be/1QzHdCfVRdpedL605oxgwroa4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=Yohs6kzPenz+7fvkNQqsgqjcizhpV6loWrgfeXjvWU+N9YnrmbtfIs9WcjgVbGiEe T7JjVxgzVXUc7k/5/702IZLUWtiuOAtLHd7HsMz9LUWvhiSEqLexP2hHKA+m3gZXcw VNzLTRCY7WRLrHkH6YugBKDrcUFQEQuPKxMwXo5ljTj2GwhjF6cnFg0M+HDtwJ3Nmx PrfigqL8H6MMAvDqdQAth0xfVHh5WIth54KDkKUohzvYWqDcPeOqk2PTo8GLnYgfs4 f/1z4kprzrk4lU6ILHj7kM5tArYQYH95TYGa0W6RDCf3ppF/NkzE65rLcKoEKmenTL S+tUderlBdGfw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VTGQP3nTVz9rxB; Tue, 30 Apr 2024 12:19:25 +0200 (CEST) From: Ihor Radchenko To: Morgan Smith Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] lisp/org.el: Obsolete `org-cached-entry-get' in favor of `org-entry-get' In-Reply-To: References: <87ttjkaywn.fsf@localhost> Date: Tue, 30 Apr 2024 10:20:31 +0000 Message-ID: <877cgfywwg.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.62 X-Spam-Score: -6.62 X-Migadu-Queue-Id: A5AA453637 X-Migadu-Scanner: mx13.migadu.com X-TUID: qgL29vnN91+V Morgan Smith writes: >> We need a real-life justification, not a theoretical one. > ... > I agree with all your points and I'm sorry for sending noise. However, I think > I actually found a real-life justification. > > It turns out that by replacing `org-cached-entry-get' with > `org-entry-get' the performance of my `org-clock-sum' calls got much > better for my specific use case. Due to benchmarking with my local > changes in place (sorry), I accidentally attributed this performance > increase to byte-compiling the return of `org-make-tags-matcher'. > > These numbers are also with my `org-clock-sum' rewrite patch applied. > They are in a 3M file of almost exclusivly clocking data. The filters I > use are "CATEGORY={blah}" for one clock table and "-ignore-ITEM={foo}" > for 9 others. I got similar results using "-ignore-ITEM={foo}" :match. The reason behind the slowdown is the fact that `org-cached-entry-get' forces calculating _all_ the possible properties. In my case, this leads to 10x slowdowns due to custom blocker function when calculating BLOCKED property. I thus conclude that your patch makes sense, and we can obsolete `org-cached-entry-get', especially since atomic property lookups are partially cached on the latest Org mode via org-element-cache mechanisms. However, please move the obsolete function definition to org-compat instead of removing it completely. We do it to avoid unexpected breakage for people and libraries who happen to use this public function. Also, with the old approach, if you observe slowdowns, you likely have some property being calculated slowly (like BLOCKED in my case). Do you happen to know which property is it for your setup? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at