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: Sun, 24 Jul 2022 08:16:33 +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="21428"; 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, gregory@heytings.org, monnier@iro.umontreal.ca, visuweshm@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 24 08:17:50 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 1oFUw2-0005SP-2X for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Jul 2022 08:17:50 +0200 Original-Received: from localhost ([::1]:50296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFUw0-0006zM-S2 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 24 Jul 2022 02:17:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47382) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFUvG-0006yA-Uz for bug-gnu-emacs@gnu.org; Sun, 24 Jul 2022 02:17:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56967) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFUvG-0008Pt-MZ for bug-gnu-emacs@gnu.org; Sun, 24 Jul 2022 02:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oFUvG-0002jq-Fn for bug-gnu-emacs@gnu.org; Sun, 24 Jul 2022 02:17: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: Sun, 24 Jul 2022 06:17: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.165864340510490 (code B ref 56682); Sun, 24 Jul 2022 06:17:02 +0000 Original-Received: (at 56682) by debbugs.gnu.org; 24 Jul 2022 06:16:45 +0000 Original-Received: from localhost ([127.0.0.1]:46716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFUuy-0002j7-SZ for submit@debbugs.gnu.org; Sun, 24 Jul 2022 02:16:45 -0400 Original-Received: from mail-ej1-f49.google.com ([209.85.218.49]:44606) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFUuv-0002is-7f for 56682@debbugs.gnu.org; Sun, 24 Jul 2022 02:16:43 -0400 Original-Received: by mail-ej1-f49.google.com with SMTP id ss3so15058858ejc.11 for <56682@debbugs.gnu.org>; Sat, 23 Jul 2022 23:16:41 -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=qKrzun9xC2F8AtfwBktzMfjKA9XJTXdso8uytrrd+UM=; b=cbX6jfaonrIwQvyr0jhrUlIYbDZMiS2C4KpOzQs0IcqV0Bv8W0ulab+9zP3kxJVPyz xYu1wVS+LXCD8Wts+96VqlcOvG9PJQIhAaAg6QPIyTbMZS5sw+8uFvvHKQqyTu+0ZIta ZEJ+gdajbRK+y9qk1mlfrNq/H0RDbLxjTknBrvL1qoKHD2IIcYeu3i4WjXNlwhg+Lzth pTfsqCGXQIYL6/r87l6p0YsZGg6Ek9BzCREZLnrhEvfEAOYSqNbm8yUVHkSEGKQLVA1l CTm8briyORDn6IkxJLxnVbOPiKghhdQSUKsltLkCGQna62T2xxMbcRGmIGixRkz0ORCY pXuQ== 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=qKrzun9xC2F8AtfwBktzMfjKA9XJTXdso8uytrrd+UM=; b=0ezBzvY4Rhypx6dP5agMdnu7/x6WXeXgVqmpRiCz9sT1Jv569Ne8pHVOVu8Brqz9ng KTXMLvzry6PtU11VEjMlB2hU1NlgOy+Oyqv6DpO8uvwnAXeEb1uZ4xR483ImvIQW3PB3 1urBk6yi3r2cbSt6hp8Q6LqLtxzFMqmmwAp+8G5LmG9BSxG6vSqCuEDRemxyjL5at8Zd 2rWG7h5alWoZx/enmoiTXMmHFpLRU0seo+vIfPTj3IcX65jaMjW5MKLuflf7cO1qe/3I eRjO2LBP7wlMyRaCPoTT3AgFyMy1dh4ZvYLgkeMjVtND8mw5oy+Qu0HVXCi7Oz6dEiEL iuzQ== X-Gm-Message-State: AJIora+Gl1RJQ+uzHU/wtenVmeXRnQ8ie3GcUL9krV6GtkNQt4hQbBbK XP7+QQfLT/uhCZFsTh/Be2I= X-Google-Smtp-Source: AGRyM1voLkK07G7C6aFWad9d33nyAKbhAM4r3aJOoYJ5i3NeA6HhmpXhfsxH4vs1DZ4BeStz8vz7tQ== X-Received: by 2002:a17:907:9813:b0:72f:2031:19b9 with SMTP id ji19-20020a170907981300b0072f203119b9mr5592334ejc.473.1658643394956; Sat, 23 Jul 2022 23:16:34 -0700 (PDT) Original-Received: from Mini.fritz.box (pd9e36975.dip0.t-ipconnect.de. [217.227.105.117]) by smtp.gmail.com with ESMTPSA id es21-20020a056402381500b0042de3d661d2sm5131857edb.1.2022.07.23.23.16.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Jul 2022 23:16:34 -0700 (PDT) In-Reply-To: <83o7xfhfqw.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 23 Jul 2022 20:59:35 +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:237806 Archived-At: Eli Zaretskii writes: > Which seems to be similar to slowdown due to font-lock in other cases? > For example, scrolling with the same benchmark through xdisp.c takes > 190 sec for the first time and 40 for the second time (when everything > is already fontified); whereas without font-lock it takes 20. So it > sounds like font-lock generally slows down redisplay by such small > factors? Alas, I don't remember much about the exact figures I got when I profiled this pre-21. But a doubling of run time--after font-lock has finished--doesn't appear to me to be entirely unplausible. BTW, a memory that re-emerged right now: Interestingly, the number of different text properties that the iterator checks, i.e. the number of text property names like face, fontified, display, invisible, etc. that the iterator checks, played on astonishing role back then. And the relation to performance wasn't linear either. Which is why there's one display property now, subsuming different subtypes. Originally, the subtypes were distinct properties, and display didn't exist. Way before Emacs 21. 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. Amd 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.