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#56682: Fix the long lines font locking related slowdowns Date: Mon, 15 Aug 2022 21:28:14 +0300 Message-ID: <83k079gy4h.fsf@gnu.org> References: <92da07bd028e3ede61a6@heytings.org> <47894c57-dd8b-5778-240a-3fa6540e4d37@yandex.ru> <92da07bd02941d5537e9@heytings.org> <5308e3b5-a160-17d7-77ee-b1d00acfa20d@yandex.ru> <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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3582"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56682@debbugs.gnu.org, gregory@heytings.org, monnier@iro.umontreal.ca To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 15 20:29:45 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 1oNeqO-0000lt-Jo for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 20:29:44 +0200 Original-Received: from localhost ([::1]:52292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oNeqM-0008Rs-El for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 15 Aug 2022 14:29:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59770) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNepi-0008CN-Mi for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 14:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54304) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oNepi-0000gx-DP for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 14:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oNepi-0003HO-9Y for bug-gnu-emacs@gnu.org; Mon, 15 Aug 2022 14:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Aug 2022 18:29: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.166058811612574 (code B ref 56682); Mon, 15 Aug 2022 18:29:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 15 Aug 2022 18:28:36 +0000 Original-Received: from localhost ([127.0.0.1]:44053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNepH-0003Gk-Q7 for submit@debbugs.gnu.org; Mon, 15 Aug 2022 14:28:36 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oNepG-0003GX-DJ for 56682@debbugs.gnu.org; Mon, 15 Aug 2022 14:28:34 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54242) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oNepA-0000eB-7H; Mon, 15 Aug 2022 14:28:28 -0400 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=na9sDZ8T4dLFvUjtwE23F8jJiJ3uXG1Upv6Cy2fR6eo=; b=RY481xkx6WR4 4sD92OzddQZbMtPfNdPuIAMN9UJL30PtATZMIjWl+7cWMNq7B5nGF/oCbOLUj0FIXtr+U1AKOQgwt oxuSPgy328F7fN5YP6hVLd8GpYYiKktgp2jsl/cmEG1qldfeOC4rd4sdiI6d9gu4BcfCEHN72dTmX +PV9ajYqDGdM14U5g4f12HezXoxrapj38B5819/WBu3ckuHLr4c9bwOJQeNFGpuEqFmIYZuoaEr1i LoVybYkJERCg7+Izx3xMOzeov6YSXTqzrVhOJcl04zqP0WMXyh78feVWdOheo5ZYKAn0ndjv3Xc2p Fkxgxq73OaswWe5OdB3U2A==; Original-Received: from [87.69.77.57] (port=4833 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 1oNep9-00077d-LD; Mon, 15 Aug 2022 14:28:27 -0400 In-Reply-To: (message from Dmitry Gutov on Mon, 15 Aug 2022 21:17:23 +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:239826 Archived-At: > Date: Mon, 15 Aug 2022 21:17:23 +0300 > Cc: 56682@debbugs.gnu.org, gregory@heytings.org, monnier@iro.umontreal.ca > From: Dmitry Gutov > > >> I'm pretty sure that doing all that in Lisp is a good thing, and would > >> be conducive to whatever improvements we might want to add later... > > > > No, because quite a few packages use jit-lock-register to run stuff > > that is not font-lock at all, and I don't want that to slow down > > redisplay when long lines are involved. And trying various values of > > a variable exposed to Lisp is easy enough. > > It should also be possible to move the whole invocation of the > fontification-functions up to Lisp How do you do that, given that these functions should be called from redisplay with the region of buffer text only redisplay knows about? > Another reason I chose font-lock-fontify-region, though, is that it's > called from different places. It's the common entry point for font-lock. I have no problem with doing something similar in font-lock, I'm just saying that it cannot be the only place. > I've never seen fontification-functions contain anything but > jit-lock-function, but jit-lock-functions is used by nlinum, for > instance. And bug-reference-mode, and goto-address-mode. Perhaps we > should ask Stefan's opinion on this. Stefan was and is on the CC list for the entire discussion. > And nlinum might not appreciate being narrowed. It seems to be working > okay without that in my 20 MB XML file. And in 200 MB one too. Why is it important what nlinum does, when we have native line numbers nowadays?