From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#56682: Fix the long lines font locking related slowdowns Date: Thu, 04 Aug 2022 19:26:03 +0000 Message-ID: <3d639ea12684115449f8@heytings.org> References: <83y1wjhkkh.fsf@gnu.org> <83wnc3hkdg.fsf@gnu.org> <49df74e5-e16a-a532-98d1-66c6ff1eb6c6@yandex.ru> <83pmhuft5a.fsf@gnu.org> <05388e8d8836c2e7ef3e@heytings.org> <136c4fe0fcb9ce5181cb@heytings.org> <3d639ea12689d767ba2a@heytings.org> <838ro44fc8.fsf@gnu.org> <3d639ea126d759bddfea@heytings.org> <83y1w42vp4.fsf@gnu.org> <3d639ea12618e6a503af@heytings.org> <83wnbo2uw3.fsf@gnu.org> <3d639ea126e3a4d880b8@heytings.org> <83k07o2izh.fsf@gnu.org> <3d639ea1265c40a07f40@heytings.org> <83h72s2e3o.fsf@gnu.org> <3d639ea126c6b0c6737b@heytings.org> <838ro42b1g.fsf@gnu.org> <3d639ea126db3913202e@heytings.org> <83wnbn264f.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1067"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, 56682@debbugs.gnu.org, monnier@iro.umontreal.ca, dgutov@yandex.ru To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 04 21:33:47 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 1oJgbK-000AZm-N7 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Aug 2022 21:33:46 +0200 Original-Received: from localhost ([::1]:33278 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJgbJ-0002iG-AF for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Aug 2022 15:33:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44926) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJgUo-0003wP-2f for bug-gnu-emacs@gnu.org; Thu, 04 Aug 2022 15:27:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37060) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJgUn-0003KX-QR for bug-gnu-emacs@gnu.org; Thu, 04 Aug 2022 15:27:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oJgUn-0003xb-Jk for bug-gnu-emacs@gnu.org; Thu, 04 Aug 2022 15:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Aug 2022 19:27: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.165964116715151 (code B ref 56682); Thu, 04 Aug 2022 19:27:01 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 4 Aug 2022 19:26:07 +0000 Original-Received: from localhost ([127.0.0.1]:55040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJgTv-0003wJ-5K for submit@debbugs.gnu.org; Thu, 04 Aug 2022 15:26:07 -0400 Original-Received: from heytings.org ([95.142.160.155]:39270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJgTs-0003w7-LO for 56682@debbugs.gnu.org; Thu, 04 Aug 2022 15:26:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1659641163; bh=nKCJ+nEqvh6WEiEK3a5rGrdZa1OHn1CyolaGj3cGR0U=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=v+5RDJgVj139CRKWf7BLqsezwfDfVnW4nJMxFK3QXQ+nausu8wZThv+WmTEys/yTX 8o16WDHaHcntn1ycgZR6sYOyswmACtfHEjibhDCo9YWvhG87mlPL6lau+1yq+g341v wjZ25EIM4LNZsixeqY1RqrhJH2sTMvz+mC+/CuH13Q+BmQN8TFRNuNOPhUrx25/Vnk 2pt5RFT9TByBuhd4vwVs9ucz8e7RWKiWfLrcx8u3o/I+Tk+unEuMqNEkigZwSPnH8r 5xHEUCAXTImcZT4HwwdOiXyxn1+RxfNkFfT1Q1zB9b8QmlJejRkw+aGhs6om7nsqYz pRzE3+iucGqDw== In-Reply-To: <83wnbn264f.fsf@gnu.org> 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:238795 Archived-At: > > So if composition_compute_stop_pos is the bottleneck, perhaps some > simple caching could help? > This is exactly what I tried... > > But note that when this function is called twice with the same character > position, it is called to search in different directions -- once forward > and another time back. > ... but I missed that important piece of the puzzle, thanks! > > For now, I don't see how to speed this up, without producing woefully > incorrect display. I will keep thinking, but I'm not too worried about > this case, since the current performance is tolerable enough, even if > somewhat sluggish. > Alas, it becomes much more sluggish if with a larger frame (160 columns instead of 80), and/or with only Arabic characters. Emacs takes ~10 seconds to open a file with only 6000 characters on a single line, and motion commands are slow. >> You didn't tell me whether it's okay to merge the branch with the >> latest changes? > > I think you can merge. > Done.