From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#71644: 30.0.50; Severe slowdown in larger files with markers beginning in emacs 29+ Date: Wed, 26 Jun 2024 13:49:09 +0000 Message-ID: <87r0cjddbe.fsf@localhost> References: <86ed8tozub.fsf@gnu.org> <86jzijmo5a.fsf@gnu.org> <87h6dmbyy2.fsf@localhost> <87wmmhgjao.fsf@localhost> <861q4k9bjh.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19226"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , mitchellahren@gmail.com, 71644@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 26 15:48:43 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sMT0t-0004nv-8w for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 Jun 2024 15:48:43 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMT0E-0004cA-GH; Wed, 26 Jun 2024 09:48:02 -0400 Original-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 1sMT0C-0004Zv-ON for bug-gnu-emacs@gnu.org; Wed, 26 Jun 2024 09:48:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMT0C-00083B-FZ for bug-gnu-emacs@gnu.org; Wed, 26 Jun 2024 09:48:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sMT0E-0000lU-IU for bug-gnu-emacs@gnu.org; Wed, 26 Jun 2024 09:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Jun 2024 13:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71644 X-GNU-PR-Package: emacs Original-Received: via spool by 71644-submit@debbugs.gnu.org id=B71644.17194096622898 (code B ref 71644); Wed, 26 Jun 2024 13:48:02 +0000 Original-Received: (at 71644) by debbugs.gnu.org; 26 Jun 2024 13:47:42 +0000 Original-Received: from localhost ([127.0.0.1]:38840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMSzt-0000kg-M4 for submit@debbugs.gnu.org; Wed, 26 Jun 2024 09:47:41 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:35609) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sMSzs-0000kT-8h for 71644@debbugs.gnu.org; Wed, 26 Jun 2024 09:47:40 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 1A98C240103 for <71644@debbugs.gnu.org>; Wed, 26 Jun 2024 15:47:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1719409652; bh=9/WoiVtPKig6J9HtQph+yQG8sHN0nZ0Sf1etSMHMoek=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=BcpTa/PInL29nToVMDz8q1MYHfv/ztzDRhDeW1rOlVTFgbRfvFGjWUbcyLI+4Wd7n z+nMIBGyYdDWh12WX4zXhg8Cnfs6Zk+e94Ui0WUvNmoI34tmUl5klvOhc1VU3w/lmv aA0HNWz+WIuwzLAND2bfapv9zP3g9klB23lR8579mmqbusAKGKlHXBp85u6ZdwZyD9 w/ORdwI0HZGv2kr1RmxJag7pcvoz3wIeER7/hU8jrrCiTlpZlVTrSFBGzAE/1ZCPlE XCXfHmPXZNP/Y4sDsP1NsipeNEACnQJ8fCpMyKWza8YWQ8rbFp7o2FMkcg5QCI9U1C zNO8PclU2HfkQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4W8NLB5s6Mz9rxB; Wed, 26 Jun 2024 15:47:30 +0200 (CEST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:287946 Archived-At: Stefan Monnier writes: > Yes, definitely. The threshold is at about N/100 where N is the number > of markers/headings. But why 100? Maybe because bytepos - best_below_byte > 5000 and distance += BYTECHAR_DISTANCE_INCREMENT; (BYTECHAR_DISTANCE_INCREMENT = 50) Then, (/ 5000 50) ; -> 100. In other words, for (tail = BUF_MARKERS (b); tail; tail = tail->next) loop is roughly bound to (min number-of-markers 100)-ish repetitions. So, once the number of markers exceeds 100, there is no more scaling with the marker number. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at