From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Eli Zaretskii <eliz@gnu.org>
Newsgroups: gmane.emacs.devel
Subject: Re: Major modes using `widen' is a good, even essential, programming
 practice.
Date: Sun, 07 Aug 2022 21:00:40 +0300
Message-ID: <83o7wwvsqf.fsf@gnu.org>
References: <Yu7LWWhqfvHxmBeG@ACM> <6ae35c9306ade07b4c45@heytings.org>
 <Yu/IkMyxWjvROVRn@ACM> <835yj4xhh7.fsf@gnu.org> <Yu/TOifWm1j+pS1/@ACM>
 <83y1w0w0gk.fsf@gnu.org> <Yu/v1bmvRhXq186v@ACM> <83pmhcvugm.fsf@gnu.org>
 <651cad2f-3ce3-22dd-0829-38dd3c46ec40@yandex.ru>
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="12528"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: acm@muc.de, gregory@heytings.org, emacs-devel@gnu.org
To: Dmitry Gutov <dgutov@yandex.ru>
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Aug 07 20:02:09 2022
Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>
Envelope-to: ged-emacs-devel@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 <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>)
	id 1oKkbJ-00033B-7d
	for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Aug 2022 20:02:09 +0200
Original-Received: from localhost ([::1]:47346 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>)
	id 1oKkbI-0004zh-BW
	for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Aug 2022 14:02:08 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59196)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@gnu.org>) id 1oKka9-0004Fe-VF
 for emacs-devel@gnu.org; Sun, 07 Aug 2022 14:00:57 -0400
Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58478)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@gnu.org>)
 id 1oKka9-0005jS-Dh; Sun, 07 Aug 2022 14:00:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=yYCEtOM6HVTzvju4SN3U+3PuDHHi2dMnmyNtM2xyTNU=; b=ojj1dvFqiKCj
 n2+p8Ub+ClmYTRXYfsmalBXBRbSf/+iTU5K/6/f4LMmCH0bM6C4mD58SwSAK8oIdpzRkV8fkj8dED
 tLJZo+EsefjIYO6irB96YDr8UfvTM6DrJNj+QlCPG7xR30/w8UI8d70G7kTiV808rSW3fXNGb2/Kj
 8sKskI1ztnc2BvUfOiuGXIDenHFOWK1CVUIM8Xf3VmIF3vcweAjRPi6N1pRSZGqTsecdS/AeKRCpE
 VQmFUjgjYvuK/LEVdXaEfRuqANeCVfLSi4eQ+zTRFVUQoYnmAcNOnbCvLm+lEV9u1dSY/z0VFp1oN
 kmSnV4TvVjnVVad8f1Y9+g==;
Original-Received: from [87.69.77.57] (port=4846 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@gnu.org>)
 id 1oKka8-0002fx-T2; Sun, 07 Aug 2022 14:00:57 -0400
In-Reply-To: <651cad2f-3ce3-22dd-0829-38dd3c46ec40@yandex.ru> (message from
 Dmitry Gutov on Sun, 7 Aug 2022 20:53:58 +0300)
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-devel>
List-Post: <mailto:emacs-devel@gnu.org>
List-Help: <mailto:emacs-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=subscribe>
Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org
Original-Sender: "Emacs-devel"
 <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>
Xref: news.gmane.io gmane.emacs.devel:293224
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/293224>

> Date: Sun, 7 Aug 2022 20:53:58 +0300
> Cc: gregory@heytings.org, emacs-devel@gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> 
> On 07.08.2022 20:23, Eli Zaretskii wrote:
> >> What jit-lock/font-lock actually do at the moment is to widen, then use
> >> syntax-ppss, i.e. in effect scan from BOB.
> > Yes, and that's SLOOOWWWW!
> 
> It's not slow on files of reasonable size. E.g. even if we take xdisp.c 
> (the file I've seen referred to in complaints on CC Mode's speed),
> 
>    (benchmark 1 '(save-excursion (parse-partial-sexp (point-min) 
> (point-max))))
> 
> reports 20-50 ms on my machine.

It takes 0.5 sec here.