From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Newsgroups: gmane.emacs.bugs Subject: bug#56682: Fix the long lines font locking related slowdowns Date: Mon, 25 Jul 2022 08:23:19 +0200 Message-ID: References: <837d46mjen.fsf@gnu.org> <174616cd5c33bfc14b1f@heytings.org> <837d44jr4p.fsf@gnu.org> <83bktghrn0.fsf@gnu.org> <87v8rnc2wp.fsf@gmail.com> <8335erizqh.fsf@gnu.org> <83r12bhgfo.fsf@gnu.org> <83pmhvhg7g.fsf@gnu.org> <83o7xfhfqw.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23893"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) Cc: 56682@debbugs.gnu.org, Eli Zaretskii , gregory@heytings.org, visuweshm@gmail.com To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 25 08:29:14 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 1oFrac-0005uJ-Bj for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Jul 2022 08:29:14 +0200 Original-Received: from localhost ([::1]:41002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFraa-0004nk-Rv for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Jul 2022 02:29:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36892) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFrVa-0002DE-OY for bug-gnu-emacs@gnu.org; Mon, 25 Jul 2022 02:24:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59393) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFrVa-0000vw-EF for bug-gnu-emacs@gnu.org; Mon, 25 Jul 2022 02:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oFrVa-00082R-9X for bug-gnu-emacs@gnu.org; Mon, 25 Jul 2022 02:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Jul 2022 06:24: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.165873021130856 (code B ref 56682); Mon, 25 Jul 2022 06:24:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 25 Jul 2022 06:23:31 +0000 Original-Received: from localhost ([127.0.0.1]:49142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFrV4-00081b-To for submit@debbugs.gnu.org; Mon, 25 Jul 2022 02:23:31 -0400 Original-Received: from mail-ej1-f46.google.com ([209.85.218.46]:43767) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFrV1-00081L-8a for 56682@debbugs.gnu.org; Mon, 25 Jul 2022 02:23:30 -0400 Original-Received: by mail-ej1-f46.google.com with SMTP id b11so18655329eju.10 for <56682@debbugs.gnu.org>; Sun, 24 Jul 2022 23:23:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :user-agent:mime-version; bh=UaR8Hr09Hs5IrAjago6UrTOAXcAtP+WkWZejNDjeFLI=; b=nzYl9KivTIRxqXkX+MBGHjHwGCdaw5+ioBspYpcfYenkjJYW+l9eZy5rPVQwhxAZox LfB3CvdHkGK6mBTBwNdAX1rA7UVop4oEl1iLxKgSo8OXdNdf3D8VLtZfcRKzs5Clgm0D A6CjWaylZO/jVnzTvTlFfWtKfk+gDiY2ZIZ9NUdpy0tJvhn7kFPccPXNbRRZAl8rpmUh dRptxQipZhPu79F8y9tBu8D1BBcHhLZdr4wepEvOtXr/a9iIwJsFWh/MRmWPlXWksMyw 6SpW1wv/ucuCkxj5oYEJEt4TTAuGRzf4TXyw3RfLnjwEO/FT+3R70+KCPRMlnja8BZ4u Z7Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:user-agent:mime-version; bh=UaR8Hr09Hs5IrAjago6UrTOAXcAtP+WkWZejNDjeFLI=; b=ppvB9l5cyfztvOn+3wuZ0qjo9ctaiKdKYmWsvtoJAiVW/6Xir3TtSk23B2NSAAFbaZ 7Nongqh0SpLg1SEWowHsc5FfLTP+4BX2dXx1tCKqqQ0fe2BqMgsgS7BTHvBhGroSPy2N 9PsyB0//ZTUA/yXTDUXcuN2SvaJBJr7jONJuwZkAADso7I1640sqzCgvSqjg2vPeR+pG Pz0nGRQ+8P+5wVfbSDZ/8rKhjRXaVhntsNkgaaWLgjDm32ioCIOEBi1+MT36Yf2Jxxl4 qVShNCB/tYKMkVwMf8nkLd4v6sCPmluosmC7ioEucfB/+hzOE6yohROO/uVYS/A4lU5A uWXw== X-Gm-Message-State: AJIora8JFRDoGeTC3Xsqm4YUlu/oi/xWBlVNjrKLrWjsTCVa8kObxdOm VS0BrQ9tZbWswf6EYH111HM= X-Google-Smtp-Source: AGRyM1vTrkMPWTyuQcBMJUH3Gf3h959F+0ra7wRwfFuRywhFniV90QuVOGwN/ckgP22b1C2TPoXhtg== X-Received: by 2002:a17:907:a061:b0:72f:1dde:fac0 with SMTP id ia1-20020a170907a06100b0072f1ddefac0mr8625864ejc.310.1658730201278; Sun, 24 Jul 2022 23:23:21 -0700 (PDT) Original-Received: from Mini.fritz.box (pd9e36ae0.dip0.t-ipconnect.de. [217.227.106.224]) by smtp.gmail.com with ESMTPSA id z24-20020aa7cf98000000b0043aba618bf6sm6591331edx.80.2022.07.24.23.23.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Jul 2022 23:23:20 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Sun, 24 Jul 2022 10:34:25 -0400") 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:237875 Archived-At: Stefan Monnier writes: >> Don't know if this is relevant for anything in this case. I thought I >> just mention that the interval tree might also have a potential for >> improvement, if you will. And another BTW: I was never 100% certain if >> the interval tree is really always balanced because it didn't use an >> algorithm that I knew and could recognize. > > I can answer this one: no it's not always balanced (tho in practice > it is most of the time). We could make it use a more standard > algorithm, but I have not been able to measure any impact on performance > (I also played with a splay-tree alternative, under the assumption that > we mostly consult the tree "locally" (within the visible part of the > buffer, basically), so a splay-tree could turn the O(log N) into an O(n) > where `N` is the buffer-size and `n` is the distance between > window-start and window-end). Thanks. And too bad. But I'd really prefer a standard algorithm with formally proven properties anyway. Call me German.