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: Optimizing performance of buffer markers Date: Sat, 25 Jun 2022 17:47:23 +0800 Message-ID: <87edzdulas.fsf@localhost> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28368"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 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:48:20 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 1o52Op-00078p-Hc for ged-emacs-devel@m.gmane-mx.org; Sat, 25 Jun 2022 11:48:19 +0200 Original-Received: from localhost ([::1]:50020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o52Oo-00053H-7L for ged-emacs-devel@m.gmane-mx.org; Sat, 25 Jun 2022 05:48:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o52Mp-00046y-E7 for emacs-devel@gnu.org; Sat, 25 Jun 2022 05:46:17 -0400 Original-Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:40755) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o52Mm-0003vL-L6; Sat, 25 Jun 2022 05:46:14 -0400 Original-Received: by mail-pf1-x432.google.com with SMTP id c205so4611718pfc.7; Sat, 25 Jun 2022 02:46:11 -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 :mime-version; bh=qDM0qbT1lNsBqB+M1dpHsU8RSIDGP8jb2DkhvwK87E8=; b=PQWMF5s6ULmIT+XbqIRH0Ns1t7dDB5uYdT7le4mWWWiFHGbNLpdy5y9KakaaOn0Nkf W9Fm78se91a787Xvg2SuisfLajGQrliJSOm3ONOPtQEs7YAGPgBYq5ldnxqql+ZweHQR VEN0IKaEELNZkJWimpXMgMxEMeuOixUvRis2HCPKeFKYj9j/qLPmqq/gYddsi91zNUuj 3cIlyPl7BNcbm559PV6qXeQ9cyHDMsGQr5gRmipqfgjDIHmRvmQz8z3XFCIyH7G0mFjI Y/zQNH5+k+XZN5hFzM4vutzX8dDKmadeDpahlXgEwOTHfefojaWsKkqLATNeRMbbqT88 3Gtw== 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:mime-version; bh=qDM0qbT1lNsBqB+M1dpHsU8RSIDGP8jb2DkhvwK87E8=; b=BOlYR0iNXT2QJqAy2Z0fMdQ/KqaXZHFISf7bwoo4qtTR0hx8UdRO4ZLS8C46oH+81z Sqedl4NL3NPcovHgxWigTS/ubS3A3ldlsbKv/17c6HuXETtQezmZplWwsbjU2Vq7WoQK 17v4DROackNe9u83YvsTYxP2/vyJx7P3VfpvV75vbrVw1leqYwj1dIpvJTyojlNePOnl Y8LeIuC8xXW2WuqK23ayn5W3un/ugIV0iRsi6hI71Dye5RhsYrHOqUTa3EFmxC7v1gNP GY5A+A7KW89naAs09vqkhgFIV0CWdPXaY7odqfSjFm7sDtVmVnVMf09fmfVsKC+haufw tDjA== X-Gm-Message-State: AJIora8VZwmM0j6svH4VZBwRK6rbSdi4Zq5iKZLVmYRkCY6PKJD0P1a/ 6PP63BLRhqiS7PBVrXKc1NGxGYauUBGH3CSi/nw= X-Google-Smtp-Source: AGRyM1tAnd/3U9hofemiFq+pFjTUEVtF0GUCaKmIrOhcmSO9Gjp2Y+r94dwTuneh+D6xQAMbj4270w== X-Received: by 2002:a63:af1b:0:b0:40c:d257:7d9 with SMTP id w27-20020a63af1b000000b0040cd25707d9mr3085853pge.114.1656150371004; Sat, 25 Jun 2022 02:46:11 -0700 (PDT) Original-Received: from localhost ([192.161.177.252]) by smtp.gmail.com with ESMTPSA id t24-20020a1709028c9800b0016a613012a8sm3233883plo.209.2022.06.25.02.46.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jun 2022 02:46:10 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=yantar92@gmail.com; helo=mail-pf1-x432.google.com 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, 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, 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:291594 Archived-At: Stefan Monnier writes: >> 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)). Using overlays will put extra load on display engine, on top of the performance related to pure markers.