From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#56682: Fix the long lines font locking related slowdowns Date: Tue, 02 Aug 2022 11:01:54 +0800 Message-ID: <8735effivx.fsf@yahoo.com> References: <837d46mjen.fsf@gnu.org> <8a3eaeef01be5bfaa5ef@heytings.org> <05388e8d8812bfa3695d@heytings.org> <83v8rf5894.fsf@gnu.org> <65cb7c73fd4a999cca00@heytings.org> <8c7321f2f3400a5db9be@heytings.org> <8c7321f2f388e5343475@heytings.org> <6ea376f6-d503-06d8-6d83-50c52b695394@yandex.ru> <8c7321f2f3ac52bfee4b@heytings.org> <8c7321f2f3ec1ef81af9@heytings.org> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22270"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: 56682@debbugs.gnu.org, Eli Zaretskii , Stefan Monnier , Dmitry Gutov To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 02 05:03:22 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 1oIiBm-0005cM-9S for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 02 Aug 2022 05:03:22 +0200 Original-Received: from localhost ([::1]:40456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIiBk-0000fL-Lq for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 23:03:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIiBS-0000et-Fr for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 23:03:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52207) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIiBS-00025S-6o for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 23:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oIiBR-0000Ks-V3 for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 23:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Aug 2022 03:03:01 +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.16594093351215 (code B ref 56682); Tue, 02 Aug 2022 03:03:01 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 2 Aug 2022 03:02:15 +0000 Original-Received: from localhost ([127.0.0.1]:41956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIiAg-0000JX-NS for submit@debbugs.gnu.org; Mon, 01 Aug 2022 23:02:14 -0400 Original-Received: from sonic305-22.consmr.mail.ne1.yahoo.com ([66.163.185.148]:37005) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIiAc-0000JE-TS for 56682@debbugs.gnu.org; Mon, 01 Aug 2022 23:02:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1659409325; bh=v8SfYu4YOgmfYt+Ut6IRfN3VPQs95bHYtEGpcLDih68=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=Z1L+opUZLXX/peD5/AD+tk7buQzREVhOOfIeC1NQFHVBdMil62QVRU81oOkf8/jP2JWI+f7/vm1gph15lSeX/G1radhFcI/eY8H7R76mInwWoCBcd2dMjklTLyghvMkD9FU0P7fPYRS9XNdYwFAiszgG1WUTTvO2fIK1lq7nKNc8QI4QjWQ+f7Wl5QWlulUqoaBIEBBd730BUKRpocBaKU58KTUHSbY6zHW6ifDo+JNiU1vnUGiAZCGr3gML59SHydDN1KV0zVD3oR42h0YqOZ7qNBKx60e4bQoppkjhQy5quQXn8iKGGo6KluDuzny+Qgiz0DoNmZd//hBnnrX8NA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1659409325; bh=xKgkcH7+K8WDMbAWBVptF/NahvC7+Jgw37RqGcBnngI=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=rqoGJffjErKmwTvq0nb/eusvjdDVRp4jaaOZjSPO/3Cnli4VlpUK5sQ5tecaAVfdAfnncBfbVbufccmhqFQilWAPJsVm8AAKVaYeUH2eFwFjxYzeya4rPUBE49ig0lCfulZdGUy1DY2Uv7pdpcT8Aim7aEIjqsb/NqMEuqrSSRVqSqDUBPBKktxEIutzijD+OL5annYDOO1IaQyn78ecG0JE44/ioy+gPy6ADG0n2C3Uv9k/vtGkLA0vI9u/a4NQYLkxE48rrQbn6qjbLAdU7KRt5Yfu6WRxMewE1g3ZcTpgf0uIsYjRwTwhSt7mmlwTS2ilZr3jQabpHkbbtmxv9g== X-YMail-OSG: V21W9eEVM1lagcReZ_RxTYmedX1gAm6n__wH0fEtZHbhlm6uwAU9grxoVgv320b 5cmnRu755HaoV1ZIoWAccmgMnRMv.NG87aGTNZI90WoW68V4cjTXRk85djvkSZgtAIAGcQ7xnjyM gjApz5SL0iVWuy4BpkBebsA2CyYXAkPF.ijbZp_6P21ADH8_uBNTfzz4KsFlO5jUZwv9iyfLIoHj DpQlUDhOK9eFJ9hX_8rso3lPj7yeS3EAtLiMRJu5KBDNH2PuVl1n5WkJlcDN2tIjA8_.gJVoKoZO DTj_axnLUixWGs6ynMwFjXMQfHjJpL76QwAlxjRQdm6a0BS38RByqIxmWaHzOP5jyV1nkARu0yuc XiyjLr8Bh9Qef2G0mme36V3F8xfNftKUMvXkuBpchotOHxXKC5tEngJ3GY_hbn724tn9U5xPLzvQ LlPOpr4.0_U4Ee6n4Oz0UpF7Y7G9Jz2P7BuQaU97Cg4CJUzcePW88C0AnM.__2C.PEGV_3qXmyaB 4upuNMcpD7uLT5BWK2oQoK8sVE42QmVAh25qRzTHifilYdoqBKnNlYunotcTwO3dbquWLlvvSxZL sL.zjtn127lj8NdaMPIgzc0z5JVVm5w6vZTEQUNwUX8UmqqQx1WmVWI4K6UUJZMPIKSAe1KRdQfY Dr77UUsQPsNP_NGFWua1eJ9.8d80wpHe.myJnnZ.fQHbmqQG0ykn6S4T3U5or9k1fLuHCtR9fOCg uWyg.GMg_UflWT8wIp46V.JxvNBWFPmzWWieYwK4KmjbQIVCyZqvPjwQZHQ93AK9JuzmaU7jiyNJ nlSLslj6QOfLZx0.PGrlYHD6PAzXGtBwFDbn1EVsDo X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ne1.yahoo.com with HTTP; Tue, 2 Aug 2022 03:02:05 +0000 Original-Received: by hermes--canary-production-sg3-854c886654-tp6d2 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 6922b39b6ae4899c5d7fa36be3ef6afc; Tue, 02 Aug 2022 03:02:01 +0000 (UTC) In-Reply-To: (Gregory Heytings's message of "Mon, 01 Aug 2022 09:34:18 +0000") X-Mailer: WebService/1.1.20447 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo 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" Xref: news.gmane.io gmane.emacs.bugs:238484 Archived-At: Gregory Heytings writes: > > + bool_bf long_line_syntax_ppss_done_p : 1; Please write a comment for every bitfield in that struct. > + current_buffer->long_line_syntax_ppss_done_p = 1; Why not write "true" instead of "1"? > + CALLN (Ffuncall, intern ("syntax-ppss"), Fpoint_max ()); Why not write this instead: call2 (Qsyntax_ppss, Fpoint_max ()); of course, with the appropriate DEFSYM added to the right file? I think calling "intern" with a static string in C code is an example of lazy programming. At the very least, it unduly wastes cycles.