From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id N+duKBeD9GVdLwAA62LTzQ:P1 (envelope-from ) for ; Fri, 15 Mar 2024 18:19:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id N+duKBeD9GVdLwAA62LTzQ (envelope-from ) for ; Fri, 15 Mar 2024 18:19:19 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=CQjCJSU6; 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=1710523159; 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=Yze7Vo6dUQqS1R65YzbpQPdzQMxSQDRTxJDOQTg49vE=; b=YYdkePWqYnlLjJkaN1weCKPaItpmOw/KX9ok9EWB0EWhAi+7KURYrYZnl3+kMRTbDNr9qe oCnZJNzLmK2+iov/FLAWSdqAczCv3MDjHnD2K4+2A8w7+l1dKHhvs9fMp63SFtm8oZnIld 1kAYZHooJoa7EgdGjjiYPulEka64LlD3400dWjTkj3dh2Nnxner3asgnFUjYBedNFrCdey Tbn0itbRCFm9rhqiOR65snUfv/HPyAgVh/XDR6rpHBbu1Ovo7UppoxHYnKXpREcNK5Xpw6 mFitrAjV398hFiHcGfi0DauYn4Mi+ugbDQUxTkb8P5nw8nA5zvOUO0DYziySNg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=CQjCJSU6; 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=1710523159; a=rsa-sha256; cv=none; b=t23+UhndXTfr5xKRtri+lPwsiJXDuQWYdNg8R+cVk4972rzk4BgpAfNdPhE1rkNXvrVp8R dfYHbpJQuhy7SP7JzGKv378cmpV00FDsroO29v2AAmdVj8l/vXMDQVzcgrGDEkujNM+HJV iepltoXR/7TG1W+F2Gu5FtAKk+wcyq/BFTfIg6ujTF09W+R7aYytcgA/rrZbhBZ/n7SG7G y0TtaoQQPXfEW0qpvVIK6XVIkuc7o6sqTWdyNdrEFoN6qLhrp6/pNVEszmlTxxeQsSFZ4S G2EEZ1fzYFTrLw00tJ9/A3K3b5X0xrqAi27G+ZhvQ0HCM+5ktef9D5TelzmjjA== 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 872061C3C8 for ; Fri, 15 Mar 2024 18:19:19 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rlBCU-0005yf-UQ; Fri, 15 Mar 2024 13:18:34 -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 1rlBCP-0005wj-4l for emacs-orgmode@gnu.org; Fri, 15 Mar 2024 13:18:29 -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 1rlBCM-0004x0-Mq for emacs-orgmode@gnu.org; Fri, 15 Mar 2024 13:18:28 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 320DA240103 for ; Fri, 15 Mar 2024 18:18:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1710523104; bh=mzZ524xmkNCbbP5z0U0AgbcmhrHZzVoLwYWSjrWseNg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=CQjCJSU6eQqYswYkhkwDhTS15hrL67z3oHBbB7r7JAaTzC9pm6I8wYP/ld27ZtT3s AHN+6ZSqd92VuEOSnGTqWESxq4U8eERbNfZJhJ7D/szfwUsCUz5zkjZVfnBZUiOpGI ku39nN0DWtttaxeGWA4hKVeNh9ivrlqKt6HEQRwo4Fp4NwtIrpLP59eXOQytiMHmug /LmJct8qX/PeAwo4Zrk3vQMKIMvrMT2IcDPRDe8moN4CHc4v5fcUw0v3PV0C6QtW8E il/Tx+PXCabqkYGRfmDYGIHIyZqyMNpiDp3YZQhPv68jATAZRs1JxbkBiHBtpD0NP3 Wz1s542hA7MkA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Tx9v30HR9z9rxD; Fri, 15 Mar 2024 18:18:22 +0100 (CET) From: Ihor Radchenko To: Bruno Cardoso Cc: William Denton , Emacs Org mode mailing list Subject: Re: Things got very slow: profiler output In-Reply-To: <87v85n4fqh.fsf@gmail.com> References: <65e04d75.5d0a0220.767a3.41e0@mx.google.com> <8734svei2j.fsf@localhost> <87wmq5btzn.fsf@gmail.com> <87wmq4h5j6.fsf@localhost> <875xxo5miu.fsf@gmail.com> <87a5mzind4.fsf@localhost> <87v85n4fqh.fsf@gmail.com> Date: Fri, 15 Mar 2024 17:18:20 +0000 Message-ID: <87edcbza5f.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, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -7.81 X-Spam-Score: -7.81 X-Migadu-Queue-Id: 872061C3C8 X-TUID: RaTZMqE642sw Bruno Cardoso writes: > See attached the profiler-report in emacs -Q and Org mode version 9.7-pre (release_9.6.20-1281-gfb61e8). > > In a new org file I created some headings, fold/unfold, and did some typing while recording. This does not make sense. The profiler trace implies org-activate-folds -> org-fold-core-next-visibility-change -> org-fold-core-next-folding-state-change -> org-fold-core--property-symbol-get-create (takes most time) But your benchmark showed that `org-fold-core--property-symbol-get-create' cannot take that much time... Unless it is called 100k+ times. May you do the following: 1. (require 'elp) 2. (elp-instrument-function #'org-fold-core--property-symbol-get-create) 3. Do actions in Org file 4. (elp-results) 5. See *ELP Profiling Results* 6. (elp-restore-all) For me, the result is Function Name Call Count Elapsed Time Average Time org-fold-core--property-symbol-get-create 27361 0.5646422580 2.063...e-05 (the time numbers are not real because instrumenting itself makes function a lot slower, but we can compare the call count) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at