From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Gap buffer problem? Date: Thu, 12 Dec 2024 21:07:25 +0200 Message-ID: <817695b4-4b10-4e63-aab8-9ab450b2d671@gutov.dev> References: <8634iwex8q.fsf@gnu.org> <86wmg7bso1.fsf@gnu.org> <87cyhzmzbp.fsf@telefonica.net> <87bjximwnj.fsf@protonmail.com> <87msh2l81l.fsf@protonmail.com> <12e84107-4f21-4ee0-9963-6f04bcc8f6ac@online.de> <9d3ea25a-3dc5-40ad-9e63-6511c2076c6d@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="308"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Marcus Harnisch , emacs-devel@gnu.org To: =?UTF-8?Q?Gerd_M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 12 20:08:18 2024 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 1tLoXp-000AV8-MX for ged-emacs-devel@m.gmane-mx.org; Thu, 12 Dec 2024 20:08:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLoX8-0002ZA-8b; Thu, 12 Dec 2024 14:07:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLoX7-0002Yl-0a for emacs-devel@gnu.org; Thu, 12 Dec 2024 14:07:33 -0500 Original-Received: from fout-a8-smtp.messagingengine.com ([103.168.172.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLoX4-0008C8-QC for emacs-devel@gnu.org; Thu, 12 Dec 2024 14:07:32 -0500 Original-Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id B634C1383714; Thu, 12 Dec 2024 14:07:29 -0500 (EST) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Thu, 12 Dec 2024 14:07:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1734030449; x=1734116849; bh=3Cnan2+4MpOerQc3rKcdWdJAdx6KihsUzltGzOYl6vo=; b= CMIiTwt7enwuFR5S5O0MgQTn7LwspsLJJa0QetBVT87B3txnhvWxFznAxX4lM/zH irhjyG6Dfovp/4OYYitfrOr4WEVqfIyK24UYxvfB9p0UynLzBRBi5GxoLl8oB7mM YIVh8HygsB6Xjz2MfNR8dNjxs4C7kfE4EnogtvmqJyjDs3B382he6jTPYvAnPNlo v74JHrJMR9ojoNS8gRLx8TNzREb1hc0UmsOcW+LclGxFRZECIl6QEtYu9PxLcP9t sduL1oAGXwG9V3T1af03757Fjtp6rijYAhlFfmlMPiW0Q/XMuDvQE124Xx13XTdI V3u4f3W815K7hqC9Lc9vdQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1734030449; x= 1734116849; bh=3Cnan2+4MpOerQc3rKcdWdJAdx6KihsUzltGzOYl6vo=; b=A FD/DiQzvEMjDErxr4wPcYftZYp/kd8Ebpe1LpQhNHCcmVMRfGTIPyRZn+GzNWpCX I8tVEUxGzeRVBv3Y/JRuDK7AQ22FX6BTRCJvBdre9JSvCasXod+uz86fHSrGZN6j ISGC74H/7eGP8KfZzgykfCszxh2hG9i5glmQV91+hNpA6hH/cVmNgmd8AIoyUO8x Jb2LNYyvkTeRdlmCLhxvWlW6sBWX6dZkr2MQilyKK+bMgzvTJdBCUd/qOkOkKLgH JInpzjzghYxp+xhDFzIwP1cUL1HY4YcIy/aB8R1V/U1QwdLfdPZK3YGJ624Sjkj9 3LNqQa6l4aJuHWawnZv6g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrkeehgdduudelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfg fuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomhepffhmihhtrhihucfiuhhtohhv uceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtthgvrhhnpeevueeutd dufeevheejhfeiiedtheduveevudegjeehteevfffftdduteehtddukeenucffohhmrghi nhepiigvugdruggvvhdpvhhishhurghlshhtuhguihhordgtohhmnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhv rdguvghvpdhnsggprhgtphhtthhopeefpdhmohguvgepshhmthhpohhuthdprhgtphhtth hopehgvghrugdrmhhovghllhhmrghnnhesghhmrghilhdrtghomhdprhgtphhtthhopehm hhdqghhmrghnvgesohhnlhhinhgvrdguvgdprhgtphhtthhopegvmhgrtghsqdguvghvvg hlsehgnhhurdhorhhg X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 12 Dec 2024 14:07:28 -0500 (EST) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=103.168.172.151; envelope-from=dmitry@gutov.dev; helo=fout-a8-smtp.messagingengine.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_SBL_A=0.1 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:326439 Archived-At: On 12/12/2024 05:49, Gerd Möllmann wrote: > The Zed editor, which is heavily performance-oriented, decided to use > ropes. They have are a number of blog entries that I find interesting, > for example > > https://zed.dev/blog/zed-decoded-rope-sumtree IIUC their goal there was a use a data structure that can do everything. They also have an ambition to support live collaboration, which we don't have anything for, and not for the reasons of performance. > VSCode uses persistent piece tables > > https://code.visualstudio.com/blogs/2018/03/23/text-buffer-reimplementation And this article compared to the previous "array of strings" implementation. Both editors' data structures (not ropes) seem to have something that can be used like our "newline cache", so if anything I would try to understand whether either has an advantage in that area.