From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jeff Norden Newsgroups: gmane.emacs.devel Subject: A question about overlays and performance. Date: Sat, 25 Jul 2020 11:40:26 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5025"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 25 18:43:31 2020 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 1jzNGk-0001AH-6Z for ged-emacs-devel@m.gmane-mx.org; Sat, 25 Jul 2020 18:43:30 +0200 Original-Received: from localhost ([::1]:56028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jzNGj-0000Zl-8k for ged-emacs-devel@m.gmane-mx.org; Sat, 25 Jul 2020 12:43:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jzNGB-000072-OD for emacs-devel@gnu.org; Sat, 25 Jul 2020 12:42:55 -0400 Original-Received: from mta.tntech.edu ([149.149.2.87]:55941) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jzNGA-0007jp-6S for emacs-devel@gnu.org; Sat, 25 Jul 2020 12:42:55 -0400 Original-Received: from math.tntech.edu (unknown [149.149.102.6]) by mta.tntech.edu (Postfix) with ESMTPS id 87D18300006B for ; Sat, 25 Jul 2020 11:40:32 -0500 (CDT) Original-Received: from norden.tntech.edu ([149.149.102.4] helo=norden.math.tntech.edu) by math.tntech.edu with esmtp (Exim 4.92) (envelope-from ) id 1jzNDm-0006PR-CJ for emacs-devel@gnu.org; Sat, 25 Jul 2020 11:40:30 -0500 Original-Received: by norden.math.tntech.edu (Postfix, from userid 742) id 4FFB62572B73; Sat, 25 Jul 2020 11:40:26 -0500 (CDT) X-SA-Spam-Score: 0.0 X-SA-Spam-Report: Spam detection software, running on the system "math.tntech.edu", has NOT identified this incoming email as spam. If you have any questions, contact @@CONTACT_ADDRESS@@ pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 T_SPF_HELO_TEMPERROR SPF: test of HELO record failed (temperror) 0.0 T_SPF_TEMPERROR SPF: test of record failed (temperror) Received-SPF: none client-ip=149.149.2.87; envelope-from=jnorden@math.tntech.edu; helo=mta.tntech.edu X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/25 12:40:32 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:253223 Archived-At: I've been working on an improved emacs mode for CWEB files. The elisp manual says this about overlays: However,... overlays generally don=E2=80=99t scale well... If you need to affect the visual appearance of many portions in the buffer, we recommend using text properties. I've been using text properties, but am realizing that overlays would make things a bit simpler. Is there a way to predict how many overlays will be "too many" and start to slow thing down? Does the configuration of the overlays play a role? A file with 200 sections would wind up with 400 overlays, but the layout wo= uld be simple. There would be "section" overlays that are disjoint from each other, and "subsection" overlays each of which is contained in a unique section. Each section would contain at most one subsection, so a position would never be in more than two of the overlays. It would also be easy to call (overlay-recenter) each time the cursor moves to a new section. Thanks in advance! -Jeff