From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Newsgroups: gmane.emacs.bugs Subject: bug#69071: Emacs master branch: c-ts-mode is slow with large C functions. Date: Mon, 12 Feb 2024 14:14:05 +0100 Message-ID: <87cyt1esf6.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13641"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 69071@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 12 14:26:07 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 1rZWJz-0003Fi-Hg for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 12 Feb 2024 14:26:07 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZWJf-0006tA-NK; Mon, 12 Feb 2024 08:25:47 -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 1rZWJe-0006su-8o for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2024 08:25:46 -0500 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 1rZWJe-0007sU-08 for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2024 08:25:46 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZWJu-00053l-Bm for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2024 08:26:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?K=C3=A9vin?= Le Gouguec Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Feb 2024 13:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69071 X-GNU-PR-Package: emacs Original-Received: via spool by 69071-submit@debbugs.gnu.org id=B69071.170774431819248 (code B ref 69071); Mon, 12 Feb 2024 13:26:02 +0000 Original-Received: (at 69071) by debbugs.gnu.org; 12 Feb 2024 13:25:18 +0000 Original-Received: from localhost ([127.0.0.1]:56501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZWJB-00050M-Pe for submit@debbugs.gnu.org; Mon, 12 Feb 2024 08:25:18 -0500 Original-Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:47470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZW8k-0004C2-DY for 69071@debbugs.gnu.org; Mon, 12 Feb 2024 08:14:31 -0500 Original-Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-411a6ada28dso734175e9.3 for <69071@debbugs.gnu.org>; Mon, 12 Feb 2024 05:14:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707743647; x=1708348447; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oKJMFP1ZCR6GcBeTzHOAuFz5guUS54uIPNODYNt79Pk=; b=Bc3C6Gi8oz4gcAsldm8W8J/fjVBodko9mmTbVIJgyVVJppH/FBNGnUSVM4TXPanmFb doV7CQZeRTIzNT1FsHKzP+GQC+H2jKRZAsKEi/kqmscV+5vRhRhf8Q5RcyHstIyYmcbC WkhwF9OwswKrALsovCnehmXcMZzlPBzj0+xXaRv2XXXOd0mRadOGsN1EpGevjBg6iLAu 6dJvI8E7UjLmVza7HwjslYvGDyIzZDY4L2lR0+96M6scXe5Bc/Yv/DBZbJLYD5Pjfkrv xXMyjeRup+1/W90S5BvDpf4hB5dNLxSYlqn0T4/Ga1sCc0bUcP07eM2/TNpwXavHlZpO +/rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707743647; x=1708348447; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=oKJMFP1ZCR6GcBeTzHOAuFz5guUS54uIPNODYNt79Pk=; b=T2gyD0ErfzPy9r6QDLgxWQe3eWM8dyEjBkAZwmKsTHl8xTXBxl1C8dTbR1BKxz/FkC HWTR4e6Hx0ZnupzTJY/DiC9vrTzMLiTr2R4V1CRytwpyT8a49PoUYOgg0Z0q/Lar8yR8 NNHo3p1FQ7Iv8wJ6NX0w5GX3QOtWEXBP/B2BOL3WA/UQwBAXljMeeHgHM1Jqg5iV1zMe Hh6qJEYOrP56C61ORw+7aST9GkBj1kfm4U18AQBf0ffyDDy8AYZLSvZQ55HgEF6DLk16 wHB0Jer8A+hferSK15pKatBGo375ohdqSyTWhaOMw2A/+ZwWLJNmP7RIWKDPS7j7JpHV iK5Q== X-Gm-Message-State: AOJu0Yy3YtWksc4MgXGPAoq5hTa95BZEmOQ1ldQ//MXzg2GNjJ8V7s9L ebpnWVCAP+AEwBUT1CUFBIWuUttiCPhDC94i1QCdD9ORcdCnkUvP2la6DEEW X-Google-Smtp-Source: AGHT+IEHyl2b83G7v0/vQ/gRtJOYeOj7g+NXsFXLyQhD9hgKdj9ReM//O/C/5SZuyMDR3FtkbH4+tQ== X-Received: by 2002:a05:600c:3544:b0:40e:fb76:5344 with SMTP id i4-20020a05600c354400b0040efb765344mr5402520wmq.11.1707743646894; Mon, 12 Feb 2024 05:14:06 -0800 (PST) Original-Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id a14-20020adff7ce000000b0033b2276e71csm6800918wrq.62.2024.02.12.05.14.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 05:14:06 -0800 (PST) In-Reply-To: (Alan Mackenzie's message of "Mon, 12 Feb 2024 11:30:00 +0000") 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:279892 Archived-At: Alan Mackenzie writes: > Hello, Emacs. > > Using Emacs master: > > c-ts-mode is slow on large C functions when editing towards the end of > such a function. > > As an extreme example, there is a function proto_register_rrc in the > file packet-rrc.c which is part of Wireshark. This file is "available" > from Github, but sadly no longer freely available - you need to allow > Microsoft's scripts to run on your machine. I'm willing to send this > file by email to anybody who needs it. It is almost 10 MB in size. Assuming we are talking about the same 10 MB file: $ wget https://raw.githubusercontent.com/wireshark/wireshark/master/epan/= dissectors/packet-rrc.c or $ git clone --depth 1 https://github.com/wireshark/wireshark=20 $ find wireshark -name packet-rrc.c might help? I'd suggest heeding that repository's disclaimer and using the canonical GitLab repo instead of the read-only GitHub mirror, but odds are gitlab.com's JS won't fare better on the freedom front. Debian's mirror might? https://salsa.debian.org/debian/wireshark/-/blob/debian/master/epan/dissect= ors/packet-rrc.c > proto_register_rrc is around 50,000 lines long, total size about 2=C2=BC = MB. > > Near the end of the function, after typing a character, there is a delay > of between 9 and 10 seconds (on my 7 year old machine) before redisplay > happens. This is too long. Some optimisation seems needed. > > On disabling font-lock-mode, the response becomes instantaneous.