From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Optimizing performance of buffer markers Date: Sat, 25 Jun 2022 12:20:57 +0300 Message-ID: <83edzdaykm.fsf@gnu.org> References: <2c2746e5f2558a87e8eab6f0914264a020173a9d.camel@pm.me> <27630AA3-8026-4E24-8852-ACCD9325B99D@gmail.com> <0E9E702B-B07C-4794-8498-29B9320E14CC@gmail.com> <871qvorqvv.fsf@localhost> <83tu8jq2vl.fsf@gnu.org> <87sfo37etn.fsf@localhost> <834k0jplcm.fsf@gnu.org> <878rpuwm9w.fsf@localhost> <83mteao3oj.fsf@gnu.org> <87edzmv3i0.fsf@localhost> <83k09eo1p5.fsf@gnu.org> <878rpuv17q.fsf@localhost> <83fsk2nyrm.fsf@gnu.org> <878rpr4kd4.fsf@localhost> <8335fzms6q.fsf@gnu.org> <87wndar5tt.fsf@localhost> <831qvikxqo.fsf@gnu.org> <87edzdwdqt.fsf@localhost> <83h749b099.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30812"; mail-complaints-to="usenet@ciao.gmane.io" Cc: yantar92@gmail.com, casouri@gmail.com, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 25 11:22:34 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 1o51zt-0007nU-E5 for ged-emacs-devel@m.gmane-mx.org; Sat, 25 Jun 2022 11:22:33 +0200 Original-Received: from localhost ([::1]:39564 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o51zs-0003kN-4K for ged-emacs-devel@m.gmane-mx.org; Sat, 25 Jun 2022 05:22:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43606) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o51yP-0002wa-4C for emacs-devel@gnu.org; Sat, 25 Jun 2022 05:21:02 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56186) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o51yO-0003zq-RP; Sat, 25 Jun 2022 05:21:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=jhA4v229CjeUXpATjNc5kcOeRJz4SXEAQ0pIYJHKFTs=; b=Z3gb+nMwXzdi rEubq+S8ViRK93Tu4G0w3HEigwONA/6xG6uBhRENDSQYGORLZumkiXqjNKBlUMJ57IDjnQzpBh6py u3QWytwqRXwgKj+TUCtrsl5gpt2YvxY6tvgRT/2KD/chworkcCOLnPPQptYq5PLKXIy9xxpeqvBJG pYh6FP7P/ZeU3RIkkGAHY3NNz/a22296IanMkNmLMDDRnK5ny27sRWx23ho0nmppMyPQ9RVhveR/M 9GEXV+QbE6+8hjRo7Vyts0swHtHWCqNzQofbTVq/WWLmeAgshB4llEhGndKW0B+mBeWGUZ2ArZNFv jVxIm35hiZXtOB0ZOEX39g==; Original-Received: from [87.69.77.57] (port=1402 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o51yO-0001gO-2D; Sat, 25 Jun 2022 05:21:00 -0400 In-Reply-To: (message from Stefan Monnier on Sat, 25 Jun 2022 05:07:59 -0400) 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:291591 Archived-At: > From: Stefan Monnier > Cc: yantar92@gmail.com, casouri@gmail.com, emacs-devel@gnu.org > Date: Sat, 25 Jun 2022 05:07:59 -0400 > > > Landing that branch is indeed a very Good Thing, but AFAIU this > > discussion revealed that Org adds quite a few markers of its own when > > it parses the buffer, because it wants to track the positions of some > > syntactic elements of the buffer. > > That's quite unusual, tho, and I suspect that Org's code could be > changed to use overlays instead (after all, we could define an > "efficient marker" as (make-overlay POS POS)). If that is going to be our advice, it would make sense to reimplement markers as a kind of overlays, so that Lisp programs shouldn't bother with this trick.