From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.devel Subject: Re: A question about overlays and performance. Date: Sun, 26 Jul 2020 09:33:21 +0800 Message-ID: <87365foyam.fsf@localhost> References: <835zabcz8d.fsf@gnu.org> 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="11319"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii , Jeff Norden Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jul 26 03:34:37 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 1jzVYj-0002pd-NA for ged-emacs-devel@m.gmane-mx.org; Sun, 26 Jul 2020 03:34:37 +0200 Original-Received: from localhost ([::1]:57572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jzVYi-0003CG-Hp for ged-emacs-devel@m.gmane-mx.org; Sat, 25 Jul 2020 21:34:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jzVYC-0002ma-Br for emacs-devel@gnu.org; Sat, 25 Jul 2020 21:34:04 -0400 Original-Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:35714) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jzVYA-0000Lq-Q6; Sat, 25 Jul 2020 21:34:04 -0400 Original-Received: by mail-pl1-x62a.google.com with SMTP id x9so6374632plr.2; Sat, 25 Jul 2020 18:34:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=5lRBVnVB/I3DwCPYA9q4qen7ISzQ0b9xofKQSLuAGyg=; b=ZJzPnUpzV650ijYfhJ3wMIUEKarfHorVmCtBkcAxX4QrJGvEl4aX4lvEnv52vD5VZV lKcrOMO4ZKDEiF61ivhSHSX3IZ3qpHrEIp2BppVE7AHH5A86fMVyrhxQNc2g4laszHTF w+U+yKKSJtaABCwOE679Z5vhFjMav/dgR5xHdXPokRBCYaTlrIGQC2h7n5qc4NKkKAco cuxL7nJEf6Doh025ze5Q8JB5vm+rIq087B2YA3kHlSOPAy7V7/NzSYWr4DWxs3DiXTrs Kyuq9XPoK/h0JRFqPR7BoJikDSHbN5h6O8VVLed5yHyfhGsMhGJofD26OuVJaxgHgxqF pEpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=5lRBVnVB/I3DwCPYA9q4qen7ISzQ0b9xofKQSLuAGyg=; b=oq0nWdggVA3j9VZyJQkN9GwHIv4Z9X3qde5kNC1ChI9zlVU/I0p5mr82pVzH3075A/ LCKmEWm9TcwaqdlxzK06BE4Xdb7hF2NwZxa4MHfbcUTMJ8OrEAY6ZuvfAgAfdI6/2IzI LVAHD4Xi7Qu2ZCHzpO0FcjS3Y/rUTpn1X1+dIWGYUyYl/yy8N5BIkCsl4uzOO5Z1EY1L 0gCrJ8il6iAjNDfac24MhLJ1q2AfbrE33FAqs1Lrm5zhmXxAmuk0O+mzh58qI6bvv8Ee YZWib2gUNYhdfKPjuNbBH2iQyFMnEe/VRD45tHmfJT8EcPpzp0BY9f0FcG8ZRHPY3Wro giFQ== X-Gm-Message-State: AOAM5335VKxixnn8O+i43c4GMHSi4SjZT45VLIokSEIy3ZL/V/jUQAS9 caYATqqLRtAmLRAsipuFqNUfr5c+v9Q= X-Google-Smtp-Source: ABdhPJzWzcxDkEGDdMA48xHjPmjiaG6yzHK/TtGJwrn0jgA26TBkSCOQ5p76vvJ8JHQiaPTJF1VMEw== X-Received: by 2002:a17:90a:8904:: with SMTP id u4mr12763126pjn.87.1595727240135; Sat, 25 Jul 2020 18:34:00 -0700 (PDT) Original-Received: from localhost ([104.250.131.79]) by smtp.gmail.com with ESMTPSA id 38sm9753643pgu.61.2020.07.25.18.33.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jul 2020 18:33:58 -0700 (PDT) In-Reply-To: <835zabcz8d.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=yantar92@gmail.com; helo=mail-pl1-x62a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-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:253242 Archived-At: > 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. Not directly related to the initial question here, but may I ask if there are any practical guidelines to convert overlays to text properties? I am specifically concerned about two issues when we want to use text properties instead of overlays to hide text in buffer (pointing at org-mode): - text hidden via text properties is not well-handled by isearch. For overlays, isearch can temporary reveal the hidden text, which is not the case for text hidden using 'invisible text property. - text properties are not buffer-local in indirect buffers. With overlays, it is possible to have define hidden text in basic and indirect buffer independently. However, text properties will always be shared and the text hidden in indirect buffer will automatically be hidden in the base buffer as well. Best, Ihor Eli Zaretskii writes: >> From: Jeff Norden >> Date: Sat, 25 Jul 2020 11:40:26 -0500 >>=20 >> Is there a way to predict how many overlays will be "too many" and >> start to slow thing down? > > Thousands. > >> Does the configuration of the overlays play a role? > > What do you mean by "configuration" in this context? > --=20 Ihor Radchenko, PhD, Center for Advancing Materials Performance from the Nanoscale (CAMP-nano) State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong U= niversity, Xi'an, China Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg