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: Tue, 29 Nov 2022 22:36:05 +0200 Message-ID: <4b8e84b7-e46f-aae2-c0a3-ec7a0785a636@yandex.ru> References: <83r11gdrr4.fsf@gnu.org> <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> <83tu2hlj31.fsf@gnu.org> <3e99c4c6-2d38-e147-3070-220bf27cd7e4@yandex.ru> <83r0xllest.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14106"; 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, gregory@heytings.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 29 21:37:15 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 1p07Lt-0003Mn-2Y for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Nov 2022 21:37:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p07Lk-00077o-5L; Tue, 29 Nov 2022 15:37:04 -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 1p07Li-00075Q-L8 for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 15:37:02 -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 1p07Li-0007ie-DM for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 15:37:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p07Li-0000Si-8C for bug-gnu-emacs@gnu.org; Tue, 29 Nov 2022 15:37: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: Tue, 29 Nov 2022 20:37: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.16697541781767 (code B ref 56682); Tue, 29 Nov 2022 20:37:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 29 Nov 2022 20:36:18 +0000 Original-Received: from localhost ([127.0.0.1]:56182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p07Kz-0000SR-Mo for submit@debbugs.gnu.org; Tue, 29 Nov 2022 15:36:18 -0500 Original-Received: from mail-wr1-f44.google.com ([209.85.221.44]:36460) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p07Kw-0000SJ-DK for 56682@debbugs.gnu.org; Tue, 29 Nov 2022 15:36:16 -0500 Original-Received: by mail-wr1-f44.google.com with SMTP id z4so24011958wrr.3 for <56682@debbugs.gnu.org>; Tue, 29 Nov 2022 12:36:14 -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=xUw0TZtwXRe5ctqvKY4lPDzoe7xuS0C1pWde+DQteBI=; b=bj35CL9iIDXYdS1GFdlZK5384jB0RANZRAFCfdvkHHYp0noscqwhyolH/7YOgtUSnM /Jc+nPQxLg44VpFdomlr6QRBswCEghswWjdoWLDI2Q0lFAjOHBI6+Ezs2bBj2sJuUne7 b1MG5g9JBijnkIurQv3C2pPqJfRWOJuhUZciBim9oXicgiPkVnz9ikz+htH0/ITLu1g5 N+AIe6hVf5f0J422EpDmA1EQ6G/2sYPMYLjCnXsILzG5MrZtrjcsfBhlwSllIFNggy3T P/cbkkmjg6OnW+obY7nMEliHhfOu9gzq4uXBD0b37H5BTFXP5d7LeBtERodWIJNSBnAQ m0YQ== 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=xUw0TZtwXRe5ctqvKY4lPDzoe7xuS0C1pWde+DQteBI=; b=raw/o5P/t3Sad58UNmIrVDI46x+i6zrhv1ReX+zmZ3d2mtMP18doYc9ak3mykkJtLm IM68T8wWNh5pxnnsa1e8AMV9WkZMNHFk/l5NRwvEKYmysv85Lodbo3wbIPrUKJYmUFlu I9PhxnywVvnD9tuXfKXX3hSQlvekcpPx7kA8/ULbtxEKD6XhNUB5WYO2Lr8xna8Srqxc aecQPIobh8qtAGfoAx5+f7QdJ9EDR08/c8YhEEi43hgtzLhZ+7yL5/3pcAPz2P+8+TWx Rbd5+2kb+0yJnVgfYJBtrF1Kf4tWt/VjsVRZwdBXXAHT47dfo4EYeyVw+iqVVrMuVgj/ 2xkA== X-Gm-Message-State: ANoB5pmfI62G37tm3UO3HUOhLoZsvmPnZyQfBjGuJOq4XypYIjKudX8F mIGb1tgwXVAhRZhI8pBXb80= X-Google-Smtp-Source: AA0mqf48wDFl3UCtD4iG9PEIQ6PValqn759iFtVX89at4Cv2IvZWYN2ulJNxX9KUZmK+E7esQZhd7Q== X-Received: by 2002:a5d:4d09:0:b0:235:e330:71ba with SMTP id z9-20020a5d4d09000000b00235e33071bamr36048685wrt.213.1669754168247; Tue, 29 Nov 2022 12:36:08 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id z18-20020a1c4c12000000b003cf6c2f9513sm3202024wmf.2.2022.11.29.12.36.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Nov 2022 12:36:07 -0800 (PST) Content-Language: en-US In-Reply-To: <83r0xllest.fsf@gnu.org> 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:249435 Archived-At: On 29/11/2022 21:51, Eli Zaretskii wrote: >> Date: Tue, 29 Nov 2022 21:29:59 +0200 >> Cc: 56682@debbugs.gnu.org, gregory@heytings.org, monnier@iro.umontreal.ca >> From: Dmitry Gutov >> >>>> That's the regression. >>> The faster ones use a different major-mode, btw. >> >> The old (faster) revision uses js-mode, the new one -- the optimized >> js-json-mode. I'm sure I could have made a mistake doing that >> optimization, but the behavior doesn't indicate that: the delays are >> higher near BOB and seem absent near EOB (in master/emacs-29), and they >> don't show up in the profiler in separate leaf nodes (the previous ones >> -- which I worked on optimizing -- did). > > I didn't say the new mode was the culprit (you could have assumed I tried > the old mode as soon as I discovered this change since July). I just > mentioned this for completeness, so we are aware what we are comparing. For completeness we could also mention that js-mode also had one significant change in font-lock rules (also an optimization) which is not as easily transplantable. > Anyway, do you see any effect if you set long-line-threshold to nil? Here > it makes the redisplay after insertion instantaneous (and this is an > unoptimized build, where without setting that variable to nil each insertion > in dictionary-pp.json takes about half a second). Yep, that helps. So the delay is due to it looking for long lines in the buffer, I guess? Curious why it doesn't happen when near EOB. The benchmark reports a delay once, but if you run it multiple times, the timing go down to "instant".