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 ms9.migadu.com with LMTPS id kAbWGi0dlGRK1AAASxT56A (envelope-from ) for ; Thu, 22 Jun 2023 12:06:37 +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 SA3CGi0dlGTERwEAauVa8A (envelope-from ) for ; Thu, 22 Jun 2023 12:06:37 +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 25F6B288BF for ; Thu, 22 Jun 2023 12:06:37 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCHCt-0001iD-72; Thu, 22 Jun 2023 06:06:27 -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 1qCHCr-0001hs-Th for emacs-orgmode@gnu.org; Thu, 22 Jun 2023 06:06:25 -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 1qCHCq-0004mU-6x for emacs-orgmode@gnu.org; Thu, 22 Jun 2023 06:06:25 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E5EBB240105 for ; Thu, 22 Jun 2023 12:06:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1687428382; bh=tO+UBEBHBmZtHTInBr+wxhcZ6OhznEErYU8pLs86sXA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=eOVjk77kSZh1Gm1qJY8DNy6Go1FhCC78TRBESxR7FpN6WQ1xjkIQ+16w3BuVYjJNW C4doNQSxM5r2x/ege5NmwtS2ZHoKxqwZ0KSrjAFG2FiUCkIRMbRmNma86gEXZbhtLB lnqvzqaFQ6E0IfF2NS/Oix6sAz1VE6JWUq0U+RnH2pnq59ZRuyfCICKmd9OOUSFgO+ FR9MtXRuMSFyCHXJ+qviTz+DUQ79FYPupzmPENpQ+EY3aXtFW77Rw1MzefCC28PiAX OHOcNHKV3PZNQQcKF7BKzmEN9xL30A5fKVzQjiPPRSO7RsE+ywAnmokrodv2s69/0u ljTIWkEX9Z83w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Qmwxp22dhz9rxK; Thu, 22 Jun 2023 12:06:22 +0200 (CEST) From: Ihor Radchenko To: Sebastian =?utf-8?Q?W=C3=A5linder?= Cc: emacs-orgmode@gnu.org Subject: Re: org-fold style text-properties slowdown In-Reply-To: <87pm5oe3t0.fsf@nixos.mail-host-address-is-not-set> References: <87pm5oe3t0.fsf@nixos.mail-host-address-is-not-set> Date: Thu, 22 Jun 2023 10:11:17 +0000 Message-ID: <87legbdcxm.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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_H5=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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1687428397; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=tO+UBEBHBmZtHTInBr+wxhcZ6OhznEErYU8pLs86sXA=; b=Bq2ihQ2oneEFUkj4WHoH+QIp+PPxOWapmA+UKrhGtpivM60gH5CnoxVkY5prqokSI5ANmA 3dbJKUXeVIlo7JJo2cZGyleFzQUjloSwondlzCayT6cKtlIEMLPrlpL3hqusMeq2kKBlQD TNKRmv4VltKu4t8+vsmOUvRa8G5AyZdxcdDBw3gI/rjj0JW4zmki8HAOMdac65BYJnTg7K IsU+u/F2SY6zQ4ySCKAuoULSrR2HHu2AtomncFwMXXcxDF3jheKj2Jy6A8CY3cwSF4GsVS sRJcn9o/CBrXGmcJgz+KPan4IFCg0D2TPa6/M+vTgJ9XS0SKMPlKF1TzEYcKDw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=eOVjk77k; dmarc=pass (policy=none) header.from=posteo.net; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1687428397; a=rsa-sha256; cv=none; b=kmtNitOxjSeEJ0qVMXdLAQdRv3+lEQ+iTxwCn5DVTLjQokiIbMo/7+gnjv6mAdjnMQvas7 PBt/1V/I5MbNpQpZc6ucsVSNBVbJJrd8mQ2oFZdtFuOuiSFcvHdvcZKTgB8e/hoO4WWrDi uCy4TlehYx7kQU+fY7IcvJtprHtO37MZAGJRoYt5yLg+u/19/FeLHJn0CpYpVa+vYrA2if 2RBEuTYvwHwxlzRSkyjB/1uNv27CB4FehK3VA17DRdzhnGkeT9qGfjCrzKXuNtRiR1lpEv gmJrtpttM07S4sjzNuKLYNkOc7knXI4zj3NTza9fdhPQ2aw/5S2h7OxTgV7kgA== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -4.72 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=eOVjk77k; dmarc=pass (policy=none) header.from=posteo.net; 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: 25F6B288BF X-Spam-Score: -4.72 X-TUID: r3G7A4OQKRXR Sebastian W=C3=A5linder writes: > I write regularly in a massive org file ~160 000 lines, and experience pr= ogressive slowdowns as the buffer remains open when I have the setting `(se= tq org-fold-core-style 'text-properties)`. > > When the file is first opened, all operations are very fast. But as I kee= p using, it keeps slowing down and eventually slows to a crawl where typing= a single character takes several seconds. However, after closing the buffe= r and opening the file up again, the speed returns to normal. > > With `(setq org-fold-core-style 'overlays)` in my `early-init.el`, I have= no slowdown issue related to org-fold over time. > ... > The memory profiler reports nothing significant. It appears `org-fold-cor= e--fix-folded-region` is what's taking all the cycles. What's the best way = for me to proceed debugging this?=20 Try the latest bugfix branch. I recently pushed an optimization in this area: https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?h=3Dbugfix&id= =3D7b3b7b92e784c86c4ada1150d6e17a510b5ea3d0 --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at