From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier 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: Mon, 15 Aug 2022 16:25:37 -0400 Message-ID: References: <92da07bd02a6cc861e1a@heytings.org> <837d3lzv8n.fsf@gnu.org> <2c8d6755-cfe2-6559-3fde-3fa30ffb411e@yandex.ru> <83mtcgy44k.fsf@gnu.org> <83k07jx5jn.fsf@gnu.org> <866e510d-a060-7daa-d002-97861d056fa7@yandex.ru> <1144021660321893@iva5-64778ce1ba26.qloud-c.yandex.net> <12348081660379417@sas2-a098efd00d24.qloud-c.yandex.net> <66bbbb95983414e79637@heytings.org> <83wnb9hadb.fsf@gnu.org> <395454dd-7238-c5d0-e924-2f65a186baa7@yandex.ru> <83r11hh4pm.fsf@gnu.org> <3a1232a17b7bc39eb451@heytings.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32229"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 56682@debbugs.gnu.org, Gregory Heytings , Eli Zaretskii To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 15 22:26:52 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 1oNgfj-0008Ev-H8 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 22:26:51 +0200 Original-Received: from localhost ([::1]:58276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNgfi-0006L5-Ah for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 16:26:50 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNgex-0006IK-1c for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 16:26:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54408) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNgew-0002Rs-NC for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 16:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oNgew-0006EZ-GZ for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 16:26:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Aug 2022 20:26:02 +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.166059514823942 (code B ref 56682); Mon, 15 Aug 2022 20:26:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 15 Aug 2022 20:25:48 +0000 Original-Received: from localhost ([127.0.0.1]:44157 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNgeh-0006E6-R2 for submit@debbugs.gnu.org; Mon, 15 Aug 2022 16:25:48 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:60028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNgeg-0006Dt-U3 for 56682@debbugs.gnu.org; Mon, 15 Aug 2022 16:25:47 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 49EE4441427; Mon, 15 Aug 2022 16:25:41 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id E99F444141D; Mon, 15 Aug 2022 16:25:39 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1660595139; bh=tZu6xPO7uogjD4Nak4H36rsHtQVMinpnq6AF0kRq7DQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=UPlTpa4yNBL6+uGXkbg9GkmJuv4izN7bVkzA7/z85ysvnAdZU4+zWZZLbCi1rbFYV Y5WkAsmwCrdQ3cBK5x4JRY2YENJ3GKGsOAV3oxA3/Z0zBLyXEX5DeIE5SuzXSLyKOI AagaGeTyO8LNMnX9hziOpTTNy95zaFJuFtoK9ogGOSSVgdE6LIMXWjSnJU/ip7b5lT NDXZNtuBg03uxOW9KAKJWAZ4vjpVl0LdmZjraxBoryHFsU7XabXuZFzhtQPbC0LWCk nGaF7yvECLW5pXm7F+c9vzdjxwHWT7NZjKUKCoolYwQLb3t50sHrc78zYHqQ0VjuYS 3s6raz9DK6Y8A== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id CFC481201BF; Mon, 15 Aug 2022 16:25:39 -0400 (EDT) In-Reply-To: (Dmitry Gutov's message of "Mon, 15 Aug 2022 22:54:30 +0300") 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:239835 Archived-At: Dmitry Gutov [2022-08-15 22:54:30] wrote: > On 15.08.2022 22:25, Gregory Heytings wrote: >>> I've never seen fontification-functions contain anything but >>> jit-lock-function, >>> >> You did not read the thread carefully enough: two weeks ago it was >> mentioned that fontification-functions has at least two other users: in >> ELPA multi-mode.el sets fontification-functions to multi-fontify, and in >> MELPA poly-lock.el sets fontification-functions to poly-lock-function. > > Okay. But those should be easily adapted to use jit-lock-functions instead. IIUC they use `fontification-functions` to wrap the "select the current major mode" operation around the call to `jit-lock-function` so that each submode can use its own set of jit-lock clients. It's harder to hook into `jit-lock-functions` to do that because you need to detect when `jit-lock-functions` is modified. AFAICT mmm-mode does not try to do that at all. > They'll get all the corresponding performance improvements (just-in-time > fontification) as a bonus. Not sure what you mean by that. `fontification-functions` is already called "just-in-time" (and those packages don't re-implement jit-lock on their own, they just wrap themselves around jit-lock). Stefan