From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#56682: Fix the long lines font locking related slowdowns Date: Wed, 10 Aug 2022 12:55:00 +0200 Message-ID: <87bksswepn.fsf@gmx.net> References: <83mtcizov2.fsf@gnu.org> <83h72qzheq.fsf@gnu.org> <25717d84-3411-a93a-3620-e04fe0571aff@yandex.ru> <83edxuzemr.fsf@gnu.org> <83a68hzz0a.fsf@gnu.org> <6ae35c93062c589b2e02@heytings.org> <7b7fbad7-55ac-49b8-840f-7f89a7e8771a@yandex.ru> <6ae35c93064b3588974c@heytings.org> <6ae35c9306c515f420d8@heytings.org> <87k07gwkjq.fsf@gmx.net> <87fsi4wiel.fsf@gmx.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7841"; 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, Eli Zaretskii , monnier@iro.umontreal.ca, Dmitry Gutov To: Gregory Heytings Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 10 12:56:35 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 1oLjO7-0001uD-EZ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Aug 2022 12:56:35 +0200 Original-Received: from localhost ([::1]:51268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLjO6-0007S4-GA for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Aug 2022 06:56:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45930) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLjNa-0007Pd-Iw for bug-gnu-emacs@gnu.org; Wed, 10 Aug 2022 06:56:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56488) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLjNa-000189-AW for bug-gnu-emacs@gnu.org; Wed, 10 Aug 2022 06:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oLjNa-00037b-6P for bug-gnu-emacs@gnu.org; Wed, 10 Aug 2022 06:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Aug 2022 10:56: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.166012891611934 (code B ref 56682); Wed, 10 Aug 2022 10:56:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 10 Aug 2022 10:55:16 +0000 Original-Received: from localhost ([127.0.0.1]:46233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLjMp-00036Q-Lk for submit@debbugs.gnu.org; Wed, 10 Aug 2022 06:55:15 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:38663) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLjMn-000368-87 for 56682@debbugs.gnu.org; Wed, 10 Aug 2022 06:55:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1660128901; bh=ZTT42VcVmFeg0c67FIiAb/Z92EAyvx/aoPrgqbbMMK8=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=A1Kqnc2U6z5/ykZ9LuktjiQoT3VGk1PNltVREPP79C0h8l1GmffA0Ha47QeFFInWp izmsVBxLYRojxP9q/KIbC9F6cHr4p2LRQbNZSUK6q+0Ce/Hbc+2nXqNh50RM9fE4ku dsvGhhakSOOVgnuNJlkej9xtZPdJm3rWTUfs4WE8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from strobelfs2 ([89.246.36.16]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M72sJ-1oJoE62Typ-008d7a; Wed, 10 Aug 2022 12:55:01 +0200 In-Reply-To: (Gregory Heytings's message of "Wed, 10 Aug 2022 10:34:32 +0000") X-Provags-ID: V03:K1:/7y5olnyTybb9Uqru+EBsASxagmQTMV6jeD4WbJ0F+Em0+hVbzB ttPJhR4WGhpP3v1r9ll7qb+hU11suGZwJ+Lrz6eYRrOvtWAEW21wxozI6+NdM6+jg/ayvb9 ZqXYk2PhKocsYBe/74O9N3K5bPdyL9llDT9dR6J8diDulP5oupA/ELD4bHuZRlKKJVj4XXO vMN2GbCi8SiSSChlpLo+Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:/S0du12uUHo=:kQiRfZnBbkGsIXBAb2xoRZ xgayA8K4NK0EJAaeZuWo7amHwbvfvDtBFWIgoyfBgh+PuQX9Rbo0TAxzAgA36UoEayfSRHo7W tRozGvK7l9ulUT0frWFSmODLydjo6ynb9FZm/r12rxDzwFr7uzqL+GgCMrxSvl1Fh44H63K01 HK8YDKOCnKqaJ+dxpE9AHU+8VNB1tXrTkahtE8W0CMMqpmDIk5gpagjP7ZWU1XvAmsd3VYHKX TKDSTvfXXf5ERnxTl+uM2xJSSnaq+xac5qTyXDz7GsBqTnGM+sjim6AJ797/+9+cnmR850dFe Ub042aeJ5AOYG6SzVyU0ayYghGH5Rzr/70crpdlecV8E/YAfT/PVSve9APuJuwMcRjYWkbVgv qTkHPVAo1iCPZ+FVWjPIgmYZtRkL99vdsfLS01BJ9ydVnZ05YBhmiIJPJE4hSJRHQnqvMzgtS GCwk/758us9vgbnz/SQnk0sNccSr+kI/H6EQYFs8TLq6xRHZWl1F9u08NoLFP5b071KtPvaXU 4wWeD86gLQSqRqH21K74eWzBnKn1eButkcoNdh5J+ULFZuLRohXSSoU3y1PWFyc2NVrHHZxK2 trQxS8WEpVUA8iBuN4sOGMGskFK6P6iM1g1rcCDGYUZVbe5/R3YbamEj5MPcMKVNs4czyiZkI ppiCiCd3HLI1kWP50kUWZ7L5uwQaRt5oPFOkcxtOShDLUoUdmWew6JuGGw/RxReO1T7GYOucs nao1a48k5c1tW3QmyhC+qft5RT+sX6aDRRU13KJK6QpeAi5bj0Fyc/id7uAodq9q8A2BCB1C 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:239262 Archived-At: On Wed, 10 Aug 2022 10:34:32 +0000 Gregory Heytings wrote: >>> That's not expected, no, and rather surprising because it would contradict >>> what we've seen so far. Can you post that file somewhere? >> >> It contains nothing particularly personal, so I've attached it. >> > > Thanks. A last question: what CPU does your computer use? I do see a (very > slight) stuttering here, certainly not "several seconds". i7-8700 CPU @ 3.20GHz with 6 cores (12 processors). (It's somewhat throttled due to Meltdown and Spectre mitigations.) > Anyway, this file is too small for you to see the effect/benefits of long line > optimizations. The cause of the delays you see is the "Bidirectional > Parentheses Algorithm" which is used by Emacs, and which you can disable by > setting bidi-inhibit-bpa to t. It makes C-n and C-p an order of magnitude > slower in that file. On my computer and in that file, they take 50 ms with > bidi-inhibit-bpa nil and 5 ms with bidi-inhibit-bpa t. So far I don't think > these delays are annoying enough to disable that algorithm by default in files > with long lines. Another option might be to add some limits to the algorithm > in buffers with long lines, without disabling it completely. Indeed, setting bidi-inhibit-bpa to t eliminates the delay. Thanks. Steve Berman