From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: rmsbolt.el [Was: Colorful line numbers] Date: Sat, 23 Jul 2022 12:31:52 -0400 Message-ID: References: <87leslpow2.fsf@gmail.com> <83ilnpl8e0.fsf@gnu.org> <874jz9peq0.fsf@gmail.com> <837d45l6ge.fsf@gnu.org> <87zgh1nyo6.fsf@gmail.com> <831qudl1k3.fsf@gnu.org> <87v8rpntiv.fsf@gmail.com> <83sfmtjjy8.fsf@gnu.org> <87fsitnpxd.fsf@gmail.com> <83k085jgxr.fsf@gnu.org> <835yjojr0f.fsf@gnu.org> <87pmhwmat0.fsf@gmail.com> <83ilnoi0ro.fsf@gnu.org> <834jz7j07y.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="16768"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: joaotavora@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 23 18:33:02 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oFI3q-00047z-2z for ged-emacs-devel@m.gmane-mx.org; Sat, 23 Jul 2022 18:33:02 +0200 Original-Received: from localhost ([::1]:43604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFI3o-0005Al-P1 for ged-emacs-devel@m.gmane-mx.org; Sat, 23 Jul 2022 12:33:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFI2q-0004Fr-CB for emacs-devel@gnu.org; Sat, 23 Jul 2022 12:32:00 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:33268) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFI2n-0004cR-GY; Sat, 23 Jul 2022 12:31:59 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 6DABB806BB; Sat, 23 Jul 2022 12:31:55 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id CE02C805C8; Sat, 23 Jul 2022 12:31:53 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1658593913; bh=WbDrZpOlrJ59J2SW51wTuA+ZRlkOaoCeigLtYr7eMao=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=ZkKkYJPjwepvV4T5ZoMHYPLWFKnEq4JUlJScr0PMBK6o29OWVUHSgvSgl59oq56xI 7wvxw0okbsDkuZlLRXuZEybiKOd7PNaT597CfKxy3sMcFWcMAJ/nDcMEDXNNpxIBUl alKQbSnktHEWA8k9GX3V2kdXT4Ivxq7/VNhJqugESGj8CkEfYderIzEGCxd7UKtlw1 Ar1cEGJ3dk4AiEvbIvyHL1I6+futHb9Xt5ZHqTTOwJoh1Yg+NG9uM4zcJ2TJpjTDD+ FZgww+MjgPeR8OVqYJwVQq0qzgEkObCjOxAD8Ka5a/NekBlUkf5uQegzQx4bMEek1h wqEgakQcF5WkA== Original-Received: from pastel (unknown [45.72.195.111]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 9E62C1201AF; Sat, 23 Jul 2022 12:31:53 -0400 (EDT) In-Reply-To: <834jz7j07y.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 23 Jul 2022 18:52:01 +0300") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:292544 Archived-At: >> > The big difference from my POV is that text properties slow down >> > redisplay code >> If that's indeed a problem, then maybe we should provide "non-display >> text-properties". I.e. text-properties which do not influence the >> display, so we can store them in a parallel interval tree > That's quite a complication. For starters, how to make sure the same > property doesn't get stored in both trees? Next, redisplay aside, > most if not all properties that are important for redisplay are also > important to Lisp, and so Lisp programs will now have to look at two > interval trees. If we need/want to solve those problems, I don't see any technical difficulty. Until we have found it necessary, the question is moot. >> (tho we'd have to check whether the source of the slowdown is the >> interval tree itself or the length of the `plist`s stored in its >> nodes, so maybe we could have a single tree but with two `plist` >> fields, one for display-related properties and the other for >> non-display-related properties). > > The immediate source of slowdown is that the display iterator stops at > every position where the properties change, and runs all of its > "handle stop-point" handlers, each one of which examines the > properties it handles (fontified, face, invisible, and display). > > For what we do with the tree and the properties we find, see > compute_stop. So adding a text property for the line numbers's face would (in the worst case) add 2 "handle stop-points" per line (could be reduced to one by making those properties cover the whole "line plus newline" so there's only one stop-point between them). Could that really cause a measurable slow down? Stefan