From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.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 QINyBvDOMGaGIwAAqHPOHw:P1 (envelope-from ) for ; Tue, 30 Apr 2024 12:58:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id QINyBvDOMGaGIwAAqHPOHw (envelope-from ) for ; Tue, 30 Apr 2024 12:58:56 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=YRelFe3O; 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=1714474736; 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=FI+wSY4NdNcvQ92NH14vPqgd9VLTwQbN8wS9UJ0CtKw=; b=RX4+d+nPew4/EaGyKqcJV3OXMUaB/0u8I5JhLtNYKxu32P8XP13sfIc2SEo8abMOoMhgZv hjUgFFiyrykfcilGeMcw0QRfQYp9wT4eMxlmu8x/ALedh7qjmksU0H9Z+UcQ8HoI9FDTsB SAZjKnmc5pPT5SItuKwl3l7rBShPvYNpyAxhkhgTAXe5KALWCEpKUx4MEiZh8/LFppOY6Z CQFTng5EAnoiT/z4CB5yvkg3i/1Nkyw9aSiKHoNYB4bqI6QpYQYCrnAWkQ+GHkiaiGF3Xk DKYNRGHrLErdvu8t8p4uvzzLUem09Iufmvw0Qcb2oj+A+wZzqYrEvBwYs+yWRw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=YRelFe3O; 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=1714474736; a=rsa-sha256; cv=none; b=pNYUNy7jeUV/VsgLH7riTHr3OPPbuGVQYRxChF1EYlp3p2oxfIpBhycIjBmBSSkfMbsXhz qIGI8zYVwzfFX/jIZ5wd8KB5COuZzdUHbgLEW9lS7MRbFBFFz+QxzgOAXIg+xtCb/mrpuZ t/5v6J9Df35yJUIcRlQn9cwl+RWqWuqiaMcbHY1CgLz2a1ju3Etp4cGXIarFp3wk0j4XXi r2zznQx2Z/elcDs25kBLCNBYWvIHE0wHxJTOvsVB+k14iq3K7FFjuvTCBgn7K6rRzNE11D I26GoBQMd77aoeusMUc/4w+HKD9IFJzLhCySis+190iFslv5o+nnAnSmU+u4Rg== 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 E99A160186 for ; Tue, 30 Apr 2024 12:58:55 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s1lBV-0004Jw-Oe; Tue, 30 Apr 2024 06:58:05 -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 1s1lBT-0004JM-SR for emacs-orgmode@gnu.org; Tue, 30 Apr 2024 06:58:03 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s1lBR-0001u2-KB for emacs-orgmode@gnu.org; Tue, 30 Apr 2024 06:58:03 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 72ED8240028 for ; Tue, 30 Apr 2024 12:57:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1714474678; bh=a4j/mJa964qzuiUE48Bnx+i7YaLy3W67pC82rgyjxkc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=YRelFe3OvMI+nVunhb4T4KyceDQboiVRUlKinlq/OyCEJtpNbuQoUMb4mkNpnFPvP TL5tTZO12kHyvE6sUJarwIfhlbqbjoqs4e9Ci8LkpkbbwQJvxXIZpCMC2xJ/PvDKqM inUmdkkHMxedi7JxQR9D98/PdAECtGFVLdOhM+9B1IauS5utWcaWlttI+QgKUyuasE g4nnuhgJWDtwCRE7GtazOWaw6rU2/onMVN2sHD7lwgvRAYQ7buulyZ4Qvx5PmDHWSL 2AEnAFQD4aG6Qxb8u9P/ukk5P3ZGuM5ZSVrEi9bYfqWEr1aBfL/Y2Ebed/SDAJCWPt c44wvlNmi3v+A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VTHGs3FrSz6twX; Tue, 30 Apr 2024 12:57:57 +0200 (CEST) From: Ihor Radchenko To: Morgan Smith Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] Rewrite `org-clock-sum' In-Reply-To: References: Date: Tue, 30 Apr 2024 10:59:03 +0000 Message-ID: <87y18vxgjs.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.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_H3=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: -9.60 X-Spam-Score: -9.60 X-Migadu-Queue-Id: E99A160186 X-Migadu-Scanner: mx13.migadu.com X-TUID: 2fp7YLfbHv43 Morgan Smith writes: > I may have rewritten org-clock-sum yet again. See attached patch. > > * things I want you to tell me > 1. Does this look like something that could be eventually merged upstream or am > I wasting my time? Yes, it could be merged upstream. I do not see why not. > 2. Would you like me to do more performance testing? I basically only tested > my use case. If yes, should I create some test files for benchmarking that > can be shared? Your patch clearly provides more caching ability, so I anticipate an improvement. I will still need to test is on my side though to be sure. Having benchmarks would be nice, but optional. > 3. Do you want `org-element-cache-map' fixed before we merge this patch? If > yes, please be willing to wait. I have already spent probably about 8 hours > looking into it and it still makes my head hurt. A fix would be nice, but it should not be a blocker for your patch. If necessary, we can discuss that function by screen sharing. > * todo > The patch is like 95% done. I still gotta > > 1. Write a decent docstring for `org-clock-ranges'. Maybe add a news entry for > it too. Or make it internal. Then, no news entry will be required. I am not 100% sure if the return value is useful for generic use outside org-clock-sum. > 2. Check `org-clock-hd-marker' for open clock. You can simply compare it with org-element-begin for current headline. > 3. Figure out what to do about open clocks that aren't the current > one. Historically we ignored them so I guess I should just do that. Yes. Ideally, also document this in the docstring. > 4. Maybe test clocking in inlinetasks. I honestly don't even know what these > are. ********************************** TODO inline ********************************** END They can appear in parallel with paragraphs. Inlinetasks are an optional markup feature that is enabled by (require 'org-inlinetask) > * Downsides of my rewrite > > 1. Does it still perform better with the cache disabled? idk. Probably not. That should not be a problem. We are slowly moving Org code to use cache API everywhere. > 2. Radical change. Likely has bugs Then, it would be nice to add some test coverage. > 3. Dances around bugs in `org-element-cache-map' but does it actually dance > around all of them? It would be nice if you help with this by fixing known bugs and writing more tests, but it is generally not a concern _you_ need to worry about - I will (sooner or later) fix bugs in `org-element-cache-map' if they arise. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at