From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#59738: c-ts-mode is slow with large buffers. Date: Sun, 11 Dec 2022 09:25:04 +0200 Message-ID: <83lenev1v3.fsf@gnu.org> References: <87E351E0-2EE2-434A-9609-86506D2F263D@gmail.com> <83edtb3z6t.fsf@gnu.org> <3A956C88-F81D-4DED-B020-178291D405D9@gmail.com> <83fsdp1vke.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28277"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, 59738@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 11 08:26:29 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 1p4GjE-000785-9b for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Dec 2022 08:26:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4Giq-0000dj-Co; Sun, 11 Dec 2022 02:26: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 1p4Gip-0000dV-8Z for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2022 02:26:03 -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 1p4Gio-0000Rr-MR for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2022 02:26:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p4Gio-0006EK-7S for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2022 02:26:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Dec 2022 07:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59738 X-GNU-PR-Package: emacs Original-Received: via spool by 59738-submit@debbugs.gnu.org id=B59738.167074353223939 (code B ref 59738); Sun, 11 Dec 2022 07:26:02 +0000 Original-Received: (at 59738) by debbugs.gnu.org; 11 Dec 2022 07:25:32 +0000 Original-Received: from localhost ([127.0.0.1]:46158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4GiK-0006E3-78 for submit@debbugs.gnu.org; Sun, 11 Dec 2022 02:25:32 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p4GiG-0006Dx-4M for 59738@debbugs.gnu.org; Sun, 11 Dec 2022 02:25:31 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4Gi9-0000D3-TO; Sun, 11 Dec 2022 02:25:22 -0500 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=ZpyGhQFc8yMk/tPhIBbPEkADBYu4g2OJTpzdER7wDUY=; b=RgkgQhdW/tSi jbeFy1OyHtDvr6/7s3AjfLE5Uzpe17SUYTlRIHcOLAi4szx7IYqoM0hOIxzdNWGWgWvr1Zf5vxZSb sSoX2zEEnNr7odFF8b6zi39bALAQOgretyFQUY98nvLTIJh8L6GJiaRIc5ACMO7bZI4dwDwHgXPlz SF1CJPLXViFe5pt1RNkPKm2uPL4UYxtq4jI4V/4dbo1t3DRLmdsaXsJ/eMryQAfgbpS/S2a+AZOPL r22W5rW53tmfN8BbORNZo3DA5xP59OH8pTBVrpjHll+1o/P55NiBIzEq0HW5rsGlkicVE/tRFktWo IbGC4h+X1m+leAO1+JZqWQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4Ghx-0004sj-Gm; Sun, 11 Dec 2022 02:25:20 -0500 In-Reply-To: (message from Yuan Fu on Sat, 10 Dec 2022 15:14:27 -0800) 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:250577 Archived-At: > From: Yuan Fu > Date: Sat, 10 Dec 2022 15:14:27 -0800 > Cc: Eli Zaretskii , > 59738@debbugs.gnu.org > > Querying time (thus fontification time) increases as the buffer size increases, even if we limit the range of the query to a fixed region (which is what we do in tree-sitter font-lock). This is unlike c-mode, where fontifying a region takes the same amount of time regardless of the buffer size. The last sentence is inaccurate: sometimes CC Mode must look far beyond the fixed region which jit-lock.el asks it to fontify. AFAIR, that is mainly to figure out the syntactical context of the portion of the buffer that needs to be fontified.