From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#56682: locked narrowing Date: Wed, 30 Nov 2022 02:47:41 +0200 Message-ID: <38224981-a87e-c606-dcbb-930d2d6f6334@yandex.ru> References: <83edxfds7s.fsf@gnu.org> <83r11fc80o.fsf@gnu.org> <83o7wjc6o2.fsf@gnu.org> <83lernc5gu.fsf@gnu.org> <83k076dd7d.fsf@gnu.org> <83czcyd8jf.fsf@gnu.org> <83a682d66r.fsf@gnu.org> <837d36ceno.fsf@gnu.org> <37dd2827f54f8bbda5e3@heytings.org> <735c1d5b-0d64-a8e1-3aaa-91fc0248abd3@yandex.ru> <97049541-f5b4-ed3b-b8de-7c0bdc86f0f5@yandex.ru> <6e305c9b-7702-133a-3347-f64db05ade3f@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21352"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Cc: 56682@debbugs.gnu.org, Eli Zaretskii , Stefan Monnier To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 30 01:48:26 2022 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 1p0BH0-0005O5-Bj for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Nov 2022 01:48:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0BGg-0001Q9-Fk; Tue, 29 Nov 2022 19:48:06 -0500 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 1p0BGe-0001Ph-2J for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 19:48:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p0BGc-0002z1-S6 for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 19:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p0BGc-0005Jt-CL for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 19:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Nov 2022 00:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56682 X-GNU-PR-Package: emacs Original-Received: via spool by 56682-submit@debbugs.gnu.org id=B56682.166976927320443 (code B ref 56682); Wed, 30 Nov 2022 00:48:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 30 Nov 2022 00:47:53 +0000 Original-Received: from localhost ([127.0.0.1]:57487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0BGS-0005Jf-S5 for submit@debbugs.gnu.org; Tue, 29 Nov 2022 19:47:53 -0500 Original-Received: from mail-wr1-f44.google.com ([209.85.221.44]:43813) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0BGP-0005JW-ND for 56682@debbugs.gnu.org; Tue, 29 Nov 2022 19:47:51 -0500 Original-Received: by mail-wr1-f44.google.com with SMTP id g12so24721689wrs.10 for <56682@debbugs.gnu.org>; Tue, 29 Nov 2022 16:47:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=ymQYimTPVm+JZjHk4VG7E9bE69nnU5bbxQ3GcLTHGN8=; b=f9KJptOUy116sAz8/BwHaaPJjDnMBhucxmSgYPxrKmaCPzSRF4iihI0QfLy/dBNt54 RYqBy4KFK5QMoaCycca8Itj5nWNTJkh6oyr4caMrZWk9NFty9wIcPR+D+aoUoA0qukFK GS9NjO20DyKgBvuWj7yVu1oaENiCVBRBBsTEWPI8n8Ev5sjPtj2+E2Atok0V6zkdB03m nzg4JoXDyZ1LRJMgXfQ1i5KTTnO2s2wyanSRAdq5Yk2uTs4igobV7yPd3lcuadzteXyD 3AuXU5jAy5LlyIVobMrmbNB8GzqsSIcATDJq021qu+uxrNa5Ck7YXfsA13PjnncpIGrC jyvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ymQYimTPVm+JZjHk4VG7E9bE69nnU5bbxQ3GcLTHGN8=; b=0Jdt6YiN76brgs2HcWbYWEDmJ3K0qwFXwBikpELDEx+Fw/CVKZ9sn1jm34f8DKbJ+u eC5HQ6vTdXI2yP0TWGx7izn0WWyUyabGTA9bO8tP1M3KJ88r4RwEXLWkrCy7ZouUCX9K 5S+TT1x4YDdFa54nLCZisnycYX0b83heOw/xu1A4UofurIW+LqvdJwMiUYXk0LL2C0fG EQTnuv8FkojdySPQv5lDTU4Wxj2Q3Red3lK+kvcdChkWkTHNCbfwznXHpEro43uD76SF zDUbQyFcvizFtzTIPsu3NN+PoGQuNJfiKcVV7iYldKNojhDoDN48t8785yF+wyT25zMJ hHDA== X-Gm-Message-State: ANoB5pm+jADKgGemaLADOCI6tr74S8nkFjIgBPWFKx/nP9jlXxV5nywq Id7oppBsGKgU8OwWmMnkp2Q= X-Google-Smtp-Source: AA0mqf6wAUupdIz6zeh0kJh2HMhIyUfqZT09FpanJJ5c2rCNm3ezTMLuznZVUrUOY1tsbtDGtVFXSw== X-Received: by 2002:a05:6000:a17:b0:241:cc31:b2b9 with SMTP id co23-20020a0560000a1700b00241cc31b2b9mr31042900wrb.84.1669769263793; Tue, 29 Nov 2022 16:47:43 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id r17-20020a5d4e51000000b0023c8026841csm15029637wrt.23.2022.11.29.16.47.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Nov 2022 16:47:43 -0800 (PST) Content-Language: en-US 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:249460 Archived-At: On 30/11/2022 02:15, Gregory Heytings wrote: > >>> The result will be that the benchmark will report ~30ms both near BOB >>> and near EOB. So the long-lines-threshold thingy adds a regression here. >> >> It's not a regression, it's the price we agreed to pay to detect >> whether the buffer contains long lines.  That detection happens >> dynamically, to catch cases when long lines are inserted in a buffer. >> > > After looking at this closely, it turns out that the change in > 1c837c42c2 doesn't do what it was meant to do.  Sigh...  Dmitry, can you > confirm that the following change fixes this? > > diff --git a/src/xdisp.c b/src/xdisp.c > index b09aa6ec96..cdd6a7f5fe 100644 > --- a/src/xdisp.c > +++ b/src/xdisp.c > @@ -19535,7 +19535,7 @@ redisplay_window (Lisp_Object window, bool > just_this_one_p) >    /* Check whether the buffer to be displayed contains long lines.  */ >    if (!NILP (Vlong_line_threshold) >        && !current_buffer->long_line_optimizations_p > -      && CHARS_MODIFF - CHARS_UNCHANGED_MODIFIED > 8) > +      && CHARS_MODIFF - UNCHANGED_MODIFIED > 8) >      { >        ptrdiff_t cur, next, found, max = 0, threshold; >        threshold = XFIXNUM (Vlong_line_threshold); > Looking good. Thanks, Gregory!