From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 12 06:40:31 2024 Received: (at submit) by debbugs.gnu.org; 12 Feb 2024 11:40:31 +0000 Received: from localhost ([127.0.0.1]:50355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZUfe-0002gV-Tj for submit@debbugs.gnu.org; Mon, 12 Feb 2024 06:40:31 -0500 Received: from lists.gnu.org ([2001:470:142::17]:37250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZUWI-0001xW-No for submit@debbugs.gnu.org; Mon, 12 Feb 2024 06:30:43 -0500 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 1rZUVw-0002Z1-Kv for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2024 06:30:20 -0500 Received: from mail.muc.de ([193.149.48.3]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZUVu-0004ul-TT for bug-gnu-emacs@gnu.org; Mon, 12 Feb 2024 06:30:20 -0500 Received: (qmail 75468 invoked by uid 3782); 12 Feb 2024 12:30:01 +0100 Received: from acm.muc.de (pd953abfc.dip0.t-ipconnect.de [217.83.171.252]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 12 Feb 2024 12:30:00 +0100 Received: (qmail 22830 invoked by uid 1000); 12 Feb 2024 11:30:00 -0000 Date: Mon, 12 Feb 2024 11:30:00 +0000 To: bug-gnu-emacs@gnu.org Subject: Emacs master branch: c-ts-mode is slow with large C functions. Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.3; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) 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. proto_register_rrc is around 50,000 lines long, total size about 2¼ 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. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 12 08:25:18 2024 Received: (at 69071) by debbugs.gnu.org; 12 Feb 2024 13:25:18 +0000 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 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 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) 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) From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= To: Alan Mackenzie Subject: Re: bug#69071: Emacs master branch: c-ts-mode is slow with large C functions. In-Reply-To: (Alan Mackenzie's message of "Mon, 12 Feb 2024 11:30:00 +0000") References: Date: Mon, 12 Feb 2024 14:14:05 +0100 Message-ID: <87cyt1esf6.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 69071 Cc: 69071@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) 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. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 15 03:36:41 2024 Received: (at 69071) by debbugs.gnu.org; 15 Feb 2024 08:36:41 +0000 Received: from localhost ([127.0.0.1]:53957 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1raXEX-0000ai-6h for submit@debbugs.gnu.org; Thu, 15 Feb 2024 03:36:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1raXEU-0000aS-Tu for 69071@debbugs.gnu.org; Thu, 15 Feb 2024 03:36:39 -0500 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 1raXE6-0007Jo-AT; Thu, 15 Feb 2024 03:36:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=czIzi93nM6AY2+QCiFkDd0T5lKIWrNGO43gOA7QoqS8=; b=qsPr96okkL7XsW78l3zB ERLmb6USGE0Jj18Dhrucjx75L+uCFNzXvNcJvsn4clmxZTdgadN+w2aGqTP1R48fnroAASLUcJ9Xy xt/1kI7NaOm6TkO0sCc3OdSqbYVSMU8JTygQtv56iTFMHgUWJ6PDVv9XTH8QxPY91eJMY2AnUCs/k w9YhVmZaDU8M+6iNOfE0f5rkzjOXNNvn69tYQo6BMU7nNNlCqj4y45su0UwCqJC7C83KqTpZRm+Cj uYciI6201jQOJ/MOMYk0LFHL0epxf5WrNBuaEA5gPpnFrIGpB9BUc9TZV2Bs0/Ra/Olj+M/zD+lB4 YoI/pmkvBvkY+w==; Date: Thu, 15 Feb 2024 10:36:11 +0200 Message-Id: <86le7mw2dg.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie , Yuan Fu In-Reply-To: (message from Alan Mackenzie on Mon, 12 Feb 2024 11:30:00 +0000) Subject: Re: bug#69071: Emacs master branch: c-ts-mode is slow with large C functions. References: MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 69071 Cc: 69071@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.2 (-----) > Date: Mon, 12 Feb 2024 11:30:00 +0000 > From: Alan Mackenzie > > 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. > > proto_register_rrc is around 50,000 lines long, total size about 2¼ 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. Yuan, could you please look into this? From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 15 23:08:26 2024 Received: (at 69071) by debbugs.gnu.org; 16 Feb 2024 04:08:26 +0000 Received: from localhost ([127.0.0.1]:57742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rapWU-0008QZ-6v for submit@debbugs.gnu.org; Thu, 15 Feb 2024 23:08:26 -0500 Received: from mail-pl1-f175.google.com ([209.85.214.175]:42471) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rapWP-0008Q6-7Q for 69071@debbugs.gnu.org; Thu, 15 Feb 2024 23:08:22 -0500 Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-1db5212e2f6so11934855ad.1 for <69071@debbugs.gnu.org>; Thu, 15 Feb 2024 20:08:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708056416; x=1708661216; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=n8JXatupuTxC+Hd6j6nlAgjq7oXSW4q/8s0DS1IDNs8=; b=VkUEQsoKMIbRrhh0RkPM5j4SuukA/iZFUM0wb3eK5OGOD2V/3H1Z5sCxQwJ6w+lNE/ Yl6dmUyI3WU4mctIh6QbH0mLMom6LjSB7mueMulZaD32kV27qzOdJnbzr01t5w7p4MIX UgZtgend7EWml9ePX9Jw6bjhVrWM63QD2NTPeuo3Kuqb0PnUBG8lGQbiukX7574sQ8Kw 6VQmpvYZJhe1T7qqLYvyOA+P4abWkHUidVlttGcLeJDQ5ReDovdgKzEB9pnAowCrjxIp 7xjJ11yLEVFbTY92IPtK1yGOc7EkK8K0Rn4pUlEt5ZxF7wpzaAKfuLvmJPShkJWj5v9k 6Egg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708056416; x=1708661216; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n8JXatupuTxC+Hd6j6nlAgjq7oXSW4q/8s0DS1IDNs8=; b=crsXJEagCXwavimwAItB+TlegfUSAy28SDfNsZMNrOzJL732mwc00wZ1zFz3ZjhvgX OZ3UKoJnwjeW/WBVydr5Bc7Mq7Io9r2VMVAJ3SyhX24i4z6okkhjt7CBdf19k04iaOJe 4lA/p9BdMZ9jm+zztqGxobSynIJmpsmUyOs19AHeSVMI+8OcIz3OaGjI19GK+ZHlL9b9 Ec5MMPGJ6MbHI4BClM7A6JzDcExf/SgW01lt75YucUeY+vlhdVndkiBH5eMXFHypGEil y7+DMBQ2w/4ja1Kx22mnqjjmB5dAYlxBCVhB8CUkn8o7CXDhTgG1HGvDP6eW153wHkjY MwJw== X-Forwarded-Encrypted: i=1; AJvYcCUDaaTiKm8calcQziglYNLL/rINPKyDF/K50gKBALnc1TfaHRITPcTHiQJZZW0jvjuVQ5fG0iNqckuxLVvMrPWr+HGhbXU= X-Gm-Message-State: AOJu0YyPEkJRgtIaAbelEkORiQLudrdyCyyfsKXBYeFutY+HLWsc6Ptc fZe/AMAP7xixQD+ELDeNirMqD1xbpX/4IoesebLhLdL+0wFTGM1V X-Google-Smtp-Source: AGHT+IGil+0G5HOvw+xvCAfKXV+KoY3zTJJUlnBibYn6yF8MhXSItU8RRTL2gxLpn1ojRODbE1OXUQ== X-Received: by 2002:a17:903:2311:b0:1d9:b58e:709c with SMTP id d17-20020a170903231100b001d9b58e709cmr5731374plh.4.1708056415966; Thu, 15 Feb 2024 20:06:55 -0800 (PST) Received: from smtpclient.apple (172-117-161-177.res.spectrum.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id ky7-20020a170902f98700b001db6594bc27sm2032068plb.14.2024.02.15.20.06.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Feb 2024 20:06:55 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: bug#69071: Emacs master branch: c-ts-mode is slow with large C functions. From: Yuan Fu In-Reply-To: <86le7mw2dg.fsf@gnu.org> Date: Thu, 15 Feb 2024 20:06:44 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <7178B3F3-CCD7-4A2B-9F29-DFF78A6BA243@gmail.com> References: <86le7mw2dg.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3731.700.6) X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 69071 Cc: Alan Mackenzie , 69071@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.9 (--) > On Feb 15, 2024, at 12:36 AM, Eli Zaretskii wrote: >=20 >> Date: Mon, 12 Feb 2024 11:30:00 +0000 >> From: Alan Mackenzie >>=20 >> Using Emacs master: >>=20 >> c-ts-mode is slow on large C functions when editing towards the end = of >> such a function. >>=20 >> 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. >>=20 >> proto_register_rrc is around 50,000 lines long, total size about 2=C2=BC= MB. >>=20 >> 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. >>=20 >> On disabling font-lock-mode, the response becomes instantaneous. >=20 > Yuan, could you please look into this? Oops, didn=E2=80=99t see this. I=E2=80=99ll take a look. Yuan From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 20 00:51:12 2024 Received: (at 69071) by debbugs.gnu.org; 20 Feb 2024 05:51:13 +0000 Received: from localhost ([127.0.0.1]:44138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcJ28-0002Mq-DG for submit@debbugs.gnu.org; Tue, 20 Feb 2024 00:51:12 -0500 Received: from mail-pj1-f42.google.com ([209.85.216.42]:61777) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcJ23-0002MI-Dw for 69071@debbugs.gnu.org; Tue, 20 Feb 2024 00:51:11 -0500 Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-2997cb49711so1054433a91.3 for <69071@debbugs.gnu.org>; Mon, 19 Feb 2024 21:50:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708408180; x=1709012980; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=mb6xMkxdqL3ckKH9Sp3bxuWTg26G6qtRt0TPOqAPVwI=; b=DBQi6PC6vbSwco3u/CZH16X2liDVdmzi5FqkWPZM1o40pdtTjGYnQeIkzTlRBtKKVQ eX4I6+Wt/N+0IF2k+7xMjuIBGilrASPRsGKrz9NCfLo1HLJq8auR5U943fJs7kBjGwsf 58qH+rhbYFbk8UFZx4LFqkKDWYL9Xtv2d0bG4mDS/ORHqUBwIL08kI4b3BL4VcOLFAv9 ZU4U7c7gQ4sbEsxBdmY0u6GZrwQZ9C7mM3C0lHzIqhi5f/V122p9rCfbkU4jJNreGvyp W8WswFgS9wKC22yS/Y9rV7AnAAju72jaSSks/V3Q8aHmfQp7Q3ZiX3WhUmg3E/N+MqQh 52ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708408180; x=1709012980; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mb6xMkxdqL3ckKH9Sp3bxuWTg26G6qtRt0TPOqAPVwI=; b=aDWOqsysohxN66Yflxdpxj8f7mAWD8+qxbEeB7hY89ILR4hRLLVHJhuGB8m8GikLH0 wTXhtihFN5cTC93Zj3LG49QJNvFCvwIRIW+lGWRYDjo4VSU+6RajszPpPM8w8jrGMNos fxYU9zOMfJgNPbf4cJzhYJTFz21mJiQxlePqGP7wLlztqeAkRr8cD5w+WR8gXwXr6t76 Q7x3fk/Kq6OtnY9BPkIRq4aDj+Hr4HYhQVmyyZtF9KuidUTuX9fLH5wEFFFeAznUlQMx 4aLhrcx+RFs7yO1f8ac454fx0a2ls0Q4hFz5B02iAJSLoi6DnosBRCPwRIsw7lRBXjiE JK9g== X-Forwarded-Encrypted: i=1; AJvYcCVszbp/RSbHBVk1Ty1BgES11qhz1dgUZakXSANjacevWbN6ymzd6soGF/fxcv18I2yxo6+JuKtcqdEZY4+izNEO65oLhks= X-Gm-Message-State: AOJu0Yx+7HkdVVnJfs6aSMqZBpaNCXKTTsk/sY9xFK/eo1AVLMln27rt 3pHBicadfSiWjydnKT9GmcltmmstPlksxCmyKJ7RBPaLMWdyCGBL X-Google-Smtp-Source: AGHT+IFwcCntQkuUEquXd5gurGnIsfX4N9YRbwAe0jjYYGjmICOsmn41akRoiaayrIf5xVvlrPoVxg== X-Received: by 2002:a17:90a:8ce:b0:299:35e9:f18 with SMTP id 14-20020a17090a08ce00b0029935e90f18mr8087234pjn.39.1708408179697; Mon, 19 Feb 2024 21:49:39 -0800 (PST) Received: from smtpclient.apple (172-117-161-177.res.spectrum.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id y3-20020a17090a8b0300b0029942a73eaesm6395950pjn.9.2024.02.19.21.49.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Feb 2024 21:49:39 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: bug#69071: Emacs master branch: c-ts-mode is slow with large C functions. From: Yuan Fu In-Reply-To: <7178B3F3-CCD7-4A2B-9F29-DFF78A6BA243@gmail.com> Date: Mon, 19 Feb 2024 21:49:26 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <0C0D2B19-C026-4719-97C0-7F450F12D92A@gmail.com> References: <86le7mw2dg.fsf@gnu.org> <7178B3F3-CCD7-4A2B-9F29-DFF78A6BA243@gmail.com> To: Eli Zaretskii X-Mailer: Apple Mail (2.3731.700.6) X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 69071 Cc: Alan Mackenzie , 69071@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.9 (--) > On Feb 15, 2024, at 8:06 PM, Yuan Fu wrote: >=20 >=20 >=20 >> On Feb 15, 2024, at 12:36 AM, Eli Zaretskii wrote: >>=20 >>> Date: Mon, 12 Feb 2024 11:30:00 +0000 >>> From: Alan Mackenzie >>>=20 >>> Using Emacs master: >>>=20 >>> c-ts-mode is slow on large C functions when editing towards the end = of >>> such a function. >>>=20 >>> 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. >>>=20 >>> proto_register_rrc is around 50,000 lines long, total size about 2=C2=BC= MB. >>>=20 >>> 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. >>>=20 >>> On disabling font-lock-mode, the response becomes instantaneous. >>=20 >> Yuan, could you please look into this? >=20 > Oops, didn=E2=80=99t see this. I=E2=80=99ll take a look. Before we continue, let me note that this seems like another case where = tree-sitter-c parser chokes on some extreme C code. Profiler reports = shows that almost all time are spent in treesit-parser-root-node, which = indicates that all the time are spent parsing the text. Yuan 6094 61% - ... 5542 55% - self-insert-command 5542 55% - electric-indent-post-self-insert-function 5542 55% - indent-according-to-mode 5542 55% - treesit-indent 5542 55% - let* 5542 55% - treesit--indent-1 5542 55% - let* 5542 55% - cond 5542 55% - treesit-node-at 5542 55% - let* 5542 55% - if 5542 55% - or 5542 55% - treesit-buffer-root-node 5542 55% - let* 5542 55% - if 5542 55% treesit-parser-root-node 552 5% + # 3834 38% - redisplay_internal (C function) 3824 38% - redisplay--pre-redisplay-functions 3824 38% - run-hook-with-args 3824 38% - treesit--pre-redisplay 3824 38% - if 3824 38% - let 3824 38% - while 3824 38% - let 3824 38% treesit-parser-root-node 5 0% + command-execute 5 0% + timer-event-handler From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 20 08:56:28 2024 Received: (at 69071) by debbugs.gnu.org; 20 Feb 2024 13:56:28 +0000 Received: from localhost ([127.0.0.1]:44604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcQbk-0001bP-0X for submit@debbugs.gnu.org; Tue, 20 Feb 2024 08:56:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57284) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcQbh-0001b9-MG for 69071@debbugs.gnu.org; Tue, 20 Feb 2024 08:56:26 -0500 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 1rcQbE-0007Bw-KG; Tue, 20 Feb 2024 08:55:57 -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=w2SVEUcXS9cl9oSdAMdc4ZndN/CSMcWNS91Ol41Qlb8=; b=e6soKBgmgAOR RnJaXFnZ4iUw5mtHE9uPl6zum82rWm+h/99de4CzKkCedM82zYkdWz+4wS12lhSZLLQXNrdcp/YBK vUOFud3s8GD8kGZfCEP32YP/2PfbC3aCtJD1b46aRYZt0fDdRaK4lM1c/+tBdm1cajjOQXfwVLOjS hqE7aTmz3AKhjF2IyVF/IiBpL/LCoUEsiKgk7C3eWP3XizCCBi+ZjWDSOdVEJQnFa8KWaorBHcEfg 8e0rNw1nENiGnYIJndz8c9h4YwFp+9cfAJKH8mfPeIRImmUJpbeUEWH9qr1w82kQbhqgRJwbgKVNb /bXCfzHnGZ5CCNzdxQBmEQ==; Date: Tue, 20 Feb 2024 15:55:53 +0200 Message-Id: <86ttm3nst2.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-Reply-To: <0C0D2B19-C026-4719-97C0-7F450F12D92A@gmail.com> (message from Yuan Fu on Mon, 19 Feb 2024 21:49:26 -0800) Subject: Re: bug#69071: Emacs master branch: c-ts-mode is slow with large C functions. References: <86le7mw2dg.fsf@gnu.org> <7178B3F3-CCD7-4A2B-9F29-DFF78A6BA243@gmail.com> <0C0D2B19-C026-4719-97C0-7F450F12D92A@gmail.com> X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 69071 Cc: acm@muc.de, 69071@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.2 (-----) > From: Yuan Fu > Date: Mon, 19 Feb 2024 21:49:26 -0800 > Cc: Alan Mackenzie , > 69071@debbugs.gnu.org > > Before we continue, let me note that this seems like another case where tree-sitter-c parser chokes on some extreme C code. Profiler reports shows that almost all time are spent in treesit-parser-root-node, which indicates that all the time are spent parsing the text. So maybe this is something to report to tree-sitter and/or tree-sitter-c developers? (Does c++-ts-mode behave better with this file?) From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 24 15:44:10 2024 Received: (at 69071) by debbugs.gnu.org; 24 Feb 2024 20:44:10 +0000 Received: from localhost ([127.0.0.1]:56548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdysU-0002p9-51 for submit@debbugs.gnu.org; Sat, 24 Feb 2024 15:44:10 -0500 Received: from mail-qt1-f177.google.com ([209.85.160.177]:61596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdysN-0002m0-Rr for 69071@debbugs.gnu.org; Sat, 24 Feb 2024 15:44:04 -0500 Received: by mail-qt1-f177.google.com with SMTP id d75a77b69052e-42c78ba62aaso7437821cf.2 for <69071@debbugs.gnu.org>; Sat, 24 Feb 2024 12:43:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708807354; x=1709412154; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=MMxg814Jqz3BZUGzxwlaaHyG5oFyej3CSRE26o5x+fE=; b=c/8Bzg7KYh8EhNTso0KWo67YDn/PbFxWwHgQEL0VhIUM2l83kggbzzNjfyRKxC/VW6 gPxFP17ql+Dd6micmt/xdNdr2tJlUM8Llh5cWIKAISJjJWGpWg/2X/ddUfKM8i7wg0e9 FstKlmhOPRqcuWw5ky/8ywnbD+rksTqwGsS+x2s6RZq309Cz4Hy+L63n9Lo6vVWQWlzt oKwNqDNrF+QVmekPqLkk7lX6lXK6VbZEkWSInFigCsfelV9TXNWxPO5+2CJVJhcUC0n6 /IPqgIHPx/2lyIhc6ACFSoFeJrJZj5x0+kwqAkrQDzzKSA4KTbdDlH0YgQZKdeHs38aH yidg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708807354; x=1709412154; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MMxg814Jqz3BZUGzxwlaaHyG5oFyej3CSRE26o5x+fE=; b=Ze/1JFu12bnBeuXcGvQYt23pMIq4KyBqhXeHuSqFx6WyguZgqmT18DJBYLC9ZLNdkr Wm/dvnUbHwWE1gVMXTx44WQDxME5DX3rHVZ5opnOkABCYGVXWvC12ZL7EhQaMXkWQuhp c3Z/+rrGTNR9OH0XecudkMdOVozSas2o3MpMxxXQqJOJ+JOnIR8waAcIwe3qA9gqBYbL MFlfsV7Rh1kUP60lOckhX2Cs9FdAWrvVe7iTuCXktpU3fILdgYyZRWZyXq1qzBq1JsgY WcPixku9WG1ypCJXAg8wATsiuyR4JhGKoJKUhmZB2GyilkbGBl9q22aTm8pK2D+GnXsc Bjjg== X-Forwarded-Encrypted: i=1; AJvYcCUL+ITGWrgxl+WFYjtSuQb5zIr9x5l78cXqb2dXp+u5DMgwrdfer8v3evL7EIIpqMJ7iNpVPF0k+p0/by77akbystlPkSo= X-Gm-Message-State: AOJu0YzgeSaIgh1D2xpKLJcWrVaMhhjvyT/kyQbmEdwn+7zJ150+CxZS BEC8mhC5rg1W39W4HyWyOA1Ax5Zudl7ulgl0tGl0Q3kmK7mwzb0HRU5Z+fvs X-Google-Smtp-Source: AGHT+IEtxfzlibAlRoFjYyAv8QTxdNFC+Z1OiYP/CB88WLQpQStGH2jWEQ6VHCSJ4dhfh6tKKne1fw== X-Received: by 2002:a05:6830:39d8:b0:6e4:8205:d73e with SMTP id bt24-20020a05683039d800b006e48205d73emr3778975otb.10.1708806962464; Sat, 24 Feb 2024 12:36:02 -0800 (PST) Received: from smtpclient.apple (172-117-161-177.res.spectrum.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id fk17-20020a056a003a9100b006e043d3e5c2sm1444960pfb.162.2024.02.24.12.36.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Feb 2024 12:36:01 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: bug#69071: Emacs master branch: c-ts-mode is slow with large C functions. From: Yuan Fu In-Reply-To: <86ttm3nst2.fsf@gnu.org> Date: Sat, 24 Feb 2024 12:35:50 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <86le7mw2dg.fsf@gnu.org> <7178B3F3-CCD7-4A2B-9F29-DFF78A6BA243@gmail.com> <0C0D2B19-C026-4719-97C0-7F450F12D92A@gmail.com> <86ttm3nst2.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3731.700.6) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 69071 Cc: acm@muc.de, 69071@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Feb 20, 2024, at 5:55 AM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Mon, 19 Feb 2024 21:49:26 -0800 >> Cc: Alan Mackenzie , >> 69071@debbugs.gnu.org >>=20 >> Before we continue, let me note that this seems like another case = where tree-sitter-c parser chokes on some extreme C code. Profiler = reports shows that almost all time are spent in = treesit-parser-root-node, which indicates that all the time are spent = parsing the text. >=20 > So maybe this is something to report to tree-sitter and/or > tree-sitter-c developers? (Does c++-ts-mode behave better with this > file?) We could, but honestly I don=E2=80=99t think they can/want to do = anything. Yuan= From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 25 00:55:25 2024 Received: (at 69071) by debbugs.gnu.org; 25 Feb 2024 05:55:25 +0000 Received: from localhost ([127.0.0.1]:43115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1re7Tw-00015b-In for submit@debbugs.gnu.org; Sun, 25 Feb 2024 00:55:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59550) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1re7NJ-0000gD-FB for 69071@debbugs.gnu.org; Sun, 25 Feb 2024 00:48:34 -0500 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 1re7Mp-0007lU-HM; Sun, 25 Feb 2024 00:48:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=sS4eGZRrJuNUse6zsa+lRRUpCnqY7JEVHDKfdTH4lNI=; b=HkwaXSG+IOgtu7ATsSLd 5cwgRb6DUoJKExOoy2BFh6Gu1+ck8YEQhAhU+bXQcMIhWvGR4vi4Wk4c2fPYRRbD/nWQLwPvoXOSH 72uMnaCN6CLkdlEC57V3h9H1YVixjinBhxYdPbvHguWPSrJmJoQ9bBbmL0CaFjHHduwFB3jEZ/ddc 0kCduNkcvEL4QVT0c+kAnoXYEzBqp7EftCebKLBK5n0U6WclywmwjEI1FUOg71SJ90D0+BcyavQVf 2oIlk/s4gI1xbuXv+R0/uoUe5x5oDK8uQz8ZgFM6NFXiaNuwz+8runOSeWvU1mCnz4hZH3gpsd6Rd 1ApWZRmNOoFsbA==; Date: Sun, 25 Feb 2024 07:48:00 +0200 Message-Id: <86jzmtxffz.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-Reply-To: (message from Yuan Fu on Sat, 24 Feb 2024 12:35:50 -0800) Subject: Re: bug#69071: Emacs master branch: c-ts-mode is slow with large C functions. References: <86le7mw2dg.fsf@gnu.org> <7178B3F3-CCD7-4A2B-9F29-DFF78A6BA243@gmail.com> <0C0D2B19-C026-4719-97C0-7F450F12D92A@gmail.com> <86ttm3nst2.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69071 Cc: acm@muc.de, 69071@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Yuan Fu > Date: Sat, 24 Feb 2024 12:35:50 -0800 > Cc: acm@muc.de, > 69071@debbugs.gnu.org > > > > > On Feb 20, 2024, at 5:55 AM, Eli Zaretskii wrote: > > > >> From: Yuan Fu > >> Date: Mon, 19 Feb 2024 21:49:26 -0800 > >> Cc: Alan Mackenzie , > >> 69071@debbugs.gnu.org > >> > >> Before we continue, let me note that this seems like another case where tree-sitter-c parser chokes on some extreme C code. Profiler reports shows that almost all time are spent in treesit-parser-root-node, which indicates that all the time are spent parsing the text. > > > > So maybe this is something to report to tree-sitter and/or > > tree-sitter-c developers? (Does c++-ts-mode behave better with this > > file?) > > We could, but honestly I don’t think they can/want to do anything. I suggest to report this anyway: we don't have anything to lose, and there's a chance they would like to do something. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 29 20:28:39 2024 Received: (at 69071) by debbugs.gnu.org; 1 Mar 2024 01:28:39 +0000 Received: from localhost ([127.0.0.1]:35750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfrhW-0004B6-PY for submit@debbugs.gnu.org; Thu, 29 Feb 2024 20:28:39 -0500 Received: from mail-pl1-f173.google.com ([209.85.214.173]:46425) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfrhT-0004Ar-Po for 69071@debbugs.gnu.org; Thu, 29 Feb 2024 20:28:37 -0500 Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1dc96f64c10so15721415ad.1 for <69071@debbugs.gnu.org>; Thu, 29 Feb 2024 17:28:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709256422; x=1709861222; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=OIKEr16nIR8zWLUvBIAIYdKMoYP46YqxWrdavUucj4U=; b=dFatMMCSuQ3yizcR+m7s3liV0WV2MjsEJJGuNuOt6MZ1sLO9RV2H526cU9uvR/YYnU qjbNdiux2/tc2bdymnYfI4Xm9wKMLZXBhRC7TJ+e4MrN4mswUnfQ/NGU77+gu4KW8lcP uUCEwUWX9P2AhdE+jVjTSLleocKQsZj+76SS6mUrKxFwZRxKUttDvmKqxK8p4hG9TcFx 5eOlNZeoltf0WfWUaQHtPoEvwapwNakzn5PWsIZ1yVxZhLiBxHvTSNH3owJdsL5FiXHK m1Mw3s9NyjBjBg3T3H5ZJTHXCUFVS9ELh5uTeZGhjXNrjEm5xmNo5LaIU0lR/Y8onn23 8/qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709256422; x=1709861222; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OIKEr16nIR8zWLUvBIAIYdKMoYP46YqxWrdavUucj4U=; b=H67b1IDeLJ8cLvIOrCJFXSzKgqgf6utyPoeKZuKyRX8rOwYIf3IKb//eFns8Mu5qUD h9LUt2vtNKroqBWuiS3ZhUQHirnwZwhQXuLzsXZw8XZP2Ul4lAXSHdi98bZkO0FUuEMB GCqd4EQN7GZ+BR7jTlw8vm+XyWDFzrvDS/Xg6V7iev0vj6s0IgpTBH3MTK22XB7Vt317 hW+cde9HLw2F3FyQxYWYlHFj29Qvi5v5Xig3pCtwglIrcdZIbaA6xFkJ5Fd6N4W4+Uqi Kd9h20xuusvbEXVXDXXC21cJcm3cxe9U9H8kpIhDP4DHLz7oOJ1Kc4ERcCHRQ5Yfkc+u zg1Q== X-Forwarded-Encrypted: i=1; AJvYcCVHE6IbrMPKYVWLb1kiq23Uk8zojeLFIooTBLGpPLlzt963dE8Tw/p465oMb5Tl0hqwJF9IznoUl/I/M1w4uCqdtrFW384= X-Gm-Message-State: AOJu0YwODoZFyuJY0rLX2Ilamb5P9/EZzEFAnKhWBF2q9dCfaHEZhX7G p1/8QGPjImbYW2iJ0u0Ho8RfwBxS0JlvOoMRpkYZVzN77ymMPRFh X-Google-Smtp-Source: AGHT+IFQv6sCQ/RZO3qbpIuvS6GvOaUw4b/GnTGowf78j5xxJRVQZFZoG+uOnRc0Y53F/8YrRzrWgw== X-Received: by 2002:a17:902:dac6:b0:1dc:81a4:4c73 with SMTP id q6-20020a170902dac600b001dc81a44c73mr428907plx.0.1709256422217; Thu, 29 Feb 2024 17:27:02 -0800 (PST) Received: from smtpclient.apple (172-117-161-177.res.spectrum.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id 4-20020a170902e9c400b001d7252fef6bsm2145190plk.299.2024.02.29.17.27.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Feb 2024 17:27:01 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: bug#69071: Emacs master branch: c-ts-mode is slow with large C functions. From: Yuan Fu In-Reply-To: <86jzmtxffz.fsf@gnu.org> Date: Thu, 29 Feb 2024 17:26:50 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <911EE9A2-091B-49A7-A994-638FACE97E0C@gmail.com> References: <86le7mw2dg.fsf@gnu.org> <7178B3F3-CCD7-4A2B-9F29-DFF78A6BA243@gmail.com> <0C0D2B19-C026-4719-97C0-7F450F12D92A@gmail.com> <86ttm3nst2.fsf@gnu.org> <86jzmtxffz.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3731.700.6) X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 69071 Cc: acm@muc.de, 69071@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Feb 24, 2024, at 9:48 PM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Sat, 24 Feb 2024 12:35:50 -0800 >> Cc: acm@muc.de, >> 69071@debbugs.gnu.org >>=20 >>=20 >>=20 >>> On Feb 20, 2024, at 5:55 AM, Eli Zaretskii wrote: >>>=20 >>>> From: Yuan Fu >>>> Date: Mon, 19 Feb 2024 21:49:26 -0800 >>>> Cc: Alan Mackenzie , >>>> 69071@debbugs.gnu.org >>>>=20 >>>> Before we continue, let me note that this seems like another case = where tree-sitter-c parser chokes on some extreme C code. Profiler = reports shows that almost all time are spent in = treesit-parser-root-node, which indicates that all the time are spent = parsing the text. >>>=20 >>> So maybe this is something to report to tree-sitter and/or >>> tree-sitter-c developers? (Does c++-ts-mode behave better with this >>> file?) >>=20 >> We could, but honestly I don=E2=80=99t think they can/want to do = anything. >=20 > I suggest to report this anyway: we don't have anything to lose, and > there's a chance they would like to do something. >=20 > Thanks. I created an issue here: = https://github.com/tree-sitter/tree-sitter-c/issues/196 Hopefully it captures the issue. Yuan= From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 01 02:10:18 2024 Received: (at 69071) by debbugs.gnu.org; 1 Mar 2024 07:10:18 +0000 Received: from localhost ([127.0.0.1]:35940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfx29-000800-Pz for submit@debbugs.gnu.org; Fri, 01 Mar 2024 02:10:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfx28-0007zo-9m for 69071@debbugs.gnu.org; Fri, 01 Mar 2024 02:10:17 -0500 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 1rfx1a-0004Ih-Ro; Fri, 01 Mar 2024 02:09:42 -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=A3HU+7aGZbTw57jJAtcKN3Lq5TZR3o7Ho52dXGiRmUE=; b=cqWwKfTcgrS/ QftiSUUq1vDSe/532umXXJFuy+lElyto8PkVjvYb13K9v0yh65Fkbdu61S1XRYkoG3flKvrCCUfg5 DB5250Dr6Ga0trx2BI08I9+ij9q3FvwdYsOHFZnPwtR6EPNZSVV8sFk3o9pyHDIGLkhXAO0Xvu5MQ quasHe1/id/914ROq8flWjizb135/dD+5nIAVimoDyIFd60cUI9+TZsY17/Devif42WyeqSRUhKmg gtnZCjqDQ3ZPrHUhfUiNAEVcxjaeYyXmt9/dl3s+n1vDGqfhYMKslnhCeL+q7p7YabPYnoO3pqKEe EnaJm7kV+9ffmJdLzzKCPQ==; Date: Fri, 01 Mar 2024 09:09:40 +0200 Message-Id: <8634tasa17.fsf@gnu.org> From: Eli Zaretskii To: Yuan Fu In-Reply-To: <911EE9A2-091B-49A7-A994-638FACE97E0C@gmail.com> (message from Yuan Fu on Thu, 29 Feb 2024 17:26:50 -0800) Subject: Re: bug#69071: Emacs master branch: c-ts-mode is slow with large C functions. References: <86le7mw2dg.fsf@gnu.org> <7178B3F3-CCD7-4A2B-9F29-DFF78A6BA243@gmail.com> <0C0D2B19-C026-4719-97C0-7F450F12D92A@gmail.com> <86ttm3nst2.fsf@gnu.org> <86jzmtxffz.fsf@gnu.org> <911EE9A2-091B-49A7-A994-638FACE97E0C@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 69071 Cc: acm@muc.de, 69071@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Yuan Fu > Date: Thu, 29 Feb 2024 17:26:50 -0800 > Cc: acm@muc.de, > 69071@debbugs.gnu.org > > > I suggest to report this anyway: we don't have anything to lose, and > > there's a chance they would like to do something. > > > > Thanks. > > I created an issue here: https://github.com/tree-sitter/tree-sitter-c/issues/196 > > Hopefully it captures the issue. Thanks, let's hope indeed.