From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QAtaNxZN9mLHYwAAbAwnHQ (envelope-from ) for ; Fri, 12 Aug 2022 14:52:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id YKxhNxZN9mL/DAEAauVa8A (envelope-from ) for ; Fri, 12 Aug 2022 14:52:38 +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 6347F3AD9D for ; Fri, 12 Aug 2022 14:52:38 +0200 (CEST) Received: from localhost ([::1]:45078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMU9U-0006Ix-Aj for larch@yhetil.org; Fri, 12 Aug 2022 08:52:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48538) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMU8j-0006GI-T3 for emacs-orgmode@gnu.org; Fri, 12 Aug 2022 08:51:49 -0400 Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]:39759) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMU8h-0006Oo-UB for emacs-orgmode@gnu.org; Fri, 12 Aug 2022 08:51:49 -0400 Received: by mail-ot1-x329.google.com with SMTP id br15-20020a056830390f00b0061c9d73b8bdso495077otb.6 for ; Fri, 12 Aug 2022 05:51:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=txtrsXblgoZjJcGxbT69M9Ewu/H1fez4bbSHQxqR2Q8=; b=mRhSWDRDflBRCt03Iycd9lpoMsts6y2qM2kF464uxNB47Wm7PhlX96YgJp1uveWKtb /991pFIppQiqHDfDCU1CX3NnWSGnZshbXDm9ZXxgs5wlQPGyQg3SQ1nEAYptDqItqQu0 8tPidT/FAjT864I9e9OaQr5Zboa2/hYO22H5ilTaj4w+w28H2SCMiIZo9L9eAEmArITE UUp8SX5aoK2oxmPjdvRc2La4SHJL4YWQJWXn+AqzMrDADi7YbOhhJ57QQNrw/qdCBaHs gPRyIT2q9RgykxReZBy3qQ9nruYgNtz4PRX4Jsm1FXOulojbHJOAgMMXKSm/axBdG1es tG0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=txtrsXblgoZjJcGxbT69M9Ewu/H1fez4bbSHQxqR2Q8=; b=e0YdJkkV5mFl0jY9Olg/HEUHuIXHLYTfZOyoNnF0PkCVi8p0mG/8h2wxyjnn4lgKN+ T8gL+Z1679rho4FI/JQfdb6XZDNXqE8KQKu1wY5tPfoJhhhqFCRjfOd9824ov5L/Hzuq Ar50U5zziyb6c/rnvgE5XcfSmghu/VqULZZ5ox9fcs7+zKwBEqq+gJC6j7iK2V3SkJ/e odXGSsmdPKeu7r5aGIbJZ/I2kKCPYfEbumQDkrfu8uy+IAEIyyMTChQiBgMoGT8+Y7EE RN06SeWe7hKC5Yyvmnnapy2fKs3SE7EAZNi5Ox8j1ZZ1MtLL8sxDIflxjUfmQ9CjlTmD OvMg== X-Gm-Message-State: ACgBeo2DSNt2NO+AGyeCxfu8JJhy448ZqOl25n7k1I71CgSSskGR/2jT hBsIqdnEBT+BUuPHAaOHr7XNHxdmSJ7CcUH7jU8= X-Google-Smtp-Source: AA6agR43mM+e2sK+eu6TMDnOiDCGoUvrGvU69LOkUu5hz6Xj6Ir4KOeEsuTrHTj0buOFHx0pQBRjOgyJwdkN+BwRLxk= X-Received: by 2002:a05:6830:118:b0:636:ebd0:6758 with SMTP id i24-20020a056830011800b00636ebd06758mr1363485otp.244.1660308706302; Fri, 12 Aug 2022 05:51:46 -0700 (PDT) MIME-Version: 1.0 References: <62f5a905.c80a0220.1f07b.ffaeSMTPIN_ADDED_BROKEN@mx.google.com> <87o7wq8c1m.fsf@localhost> <62f64617.050a0220.b0be5.b717SMTPIN_ADDED_BROKEN@mx.google.com> In-Reply-To: <62f64617.050a0220.b0be5.b717SMTPIN_ADDED_BROKEN@mx.google.com> From: Bill Burdick Date: Fri, 12 Aug 2022 08:51:35 -0400 Message-ID: Subject: Re: [PERFORMANCE] Why some org code is so deep invoked? To: numbchild@gmail.com Cc: Ihor Radchenko , Org Mode Content-Type: multipart/alternative; boundary="000000000000a81ede05e60abe7a" Received-SPF: pass client-ip=2607:f8b0:4864:20::329; envelope-from=bill.burdick@gmail.com; helo=mail-ot1-x329.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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=1660308758; 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=txtrsXblgoZjJcGxbT69M9Ewu/H1fez4bbSHQxqR2Q8=; b=YTwo6NMJn/hYxpJKcJtK3xVadypnlCRQ0WB9dui1w6Y/J8LOzs2DREdwlSrIm/x2jUkpNH WLzjlODmdFu3qTB7T6QEhIqx8wl3iChTejp1NvChY4TFU2h1VJwMJsWSIOuFZWLHPRv76i 6YunpMvzaqnD1Gf6gZbJOQzqMLbP78taqKHLAGN7+g3O7xRQkHpPi6RM3xWj9SXBqIrZag Y54Uris6gbQ5GATWKfmHL9A8nMnRsELbsyXcdaPgmYom7PwJYjLfO2PaebZGHCM5yNvC6k 7d8estIkCWYjBMEex0aWMsz+qWoW/CxgrMwGCvNoImdAxHL/TieiRTN+k//DUA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660308758; a=rsa-sha256; cv=none; b=MPh3t5TKiqtpu3AF8+xqr40mIbS/CXSOGLttEARHakSxA/mOK4b+0aB0ucbvJkACWGmHhK hy7vonzDsVYLwY9jgFgJAMuD5p1R/iVNmDCsQtG/SfmwLnpKp/NkxnqP//c88vV/nrGryi CkVsmWcIv3XiyTj0gZJd2aMwQlHP40ivEtt8dJfEOLuSQn2gfazfoeZZUU8dGy0no2F6dQ GULMl0xVBD7ASloEOviiQEmUdi00NwDaI1Pf3icuWQh5wwp3O9mLnWxle6DEvoT5pMGKRE oxUiZzV2oTgArwTZo2wKrN2C0++85AzlOGw9UWUWgKUla/XXk9xgU+QkF6sowg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=mRhSWDRD; 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: -5.97 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=mRhSWDRD; 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: 6347F3AD9D X-Spam-Score: -5.97 X-Migadu-Scanner: scn0.migadu.com X-TUID: 9oMraPNTPH/D --000000000000a81ede05e60abe7a Content-Type: text/plain; charset="UTF-8" You'll have this with recursive code and recursion is fairly normal in Lisp programs. -- Bill On Fri, Aug 12, 2022 at 8:22 AM Christopher M. Miles wrote: > > Ihor Radchenko writes: > > > "Christopher M. Miles" writes: > > > >> When I profiling Org Agenda generation, I found that org code is deeply > invoked in Emacs profiler report. > >> > >> My Question: > >> > >> - What reason caused this situation? > >> - Can Org Mode optimize those deeply invoked code? > > > > Could you please clarify what exactly is your problem? > > Is agenda generation slow? > > From the profiler report, you can see that Agenda is slow on clock table > generation because I have ~org-agenda-start-with-clockreport-mode~ > enabled. And this deep code invocation is from it too. It's about 5 > seconds to generate the org-agenda clock table. Actually I can tolerate > this time, Just found this performance issue when profiling and curious > to ask this question. > > > I do not see much issue with deep nesting of the code. > > Is this deep nested code normal in Emacs Lisp? > > Usually (based on my less than 20 times profiling experience), Emacs > wouldn't have deeper code than 40 levels. But my attachment profiler > report has more than 100 levels. > > If this is normal and fine, It's OK. I repeat, I ask this question for > curious purpose which want to get an answer for not important question. > > -- > > [ stardiviner ] > I try to make every word tell the meaning that I want to express without > misunderstanding. > > Blog: https://stardiviner.github.io/ > IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner > GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 > --000000000000a81ede05e60abe7a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
You'll have this with recursive code and recursion is = fairly normal in Lisp programs.


<= div dir=3D"ltr" class=3D"gmail_signature" data-smartmail=3D"gmail_signature= ">
-- Bill


On Fri, Aug 12, 2022= at 8:22 AM Christopher M. Miles <numbchild@gmail.com> wrote:

Ihor Radchenko <= yantar92@gmail.com> writes:

> "Christopher M. Miles" <numbchild@gmail.com> writes:
>
>> When I profiling Org Agenda generation, I found that org code is d= eeply invoked in Emacs profiler report.
>>
>> My Question:
>>
>> - What reason caused this situation?
>> - Can Org Mode optimize those deeply invoked code?
>
> Could you please clarify what exactly is your problem?
> Is agenda generation slow?

>From the profiler report, you can see that Agenda is slow on clock table generation because I have ~org-agenda-start-with-clockreport-mode~
enabled. And this deep code invocation is from it too. It's about 5
seconds to generate the org-agenda clock table. Actually I can tolerate
this time, Just found this performance issue when profiling and curious
to ask this question.

> I do not see much issue with deep nesting of the code.

Is this deep nested code normal in Emacs Lisp?

Usually (based on my less than 20 times profiling experience), Emacs
wouldn't have deeper code than 40 levels. But my attachment profiler report has more than 100 levels.

If this is normal and fine, It's OK. I repeat, I ask this question for<= br> curious purpose which want to get an answer for not important question.

--

[ stardiviner ]
I try to make every word tell the meaning that I want to express without mi= sunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
--000000000000a81ede05e60abe7a--