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: Emacs design and architecture. How about copy-on-write? Date: Wed, 20 Sep 2023 22:39:47 +0300 Message-ID: References: <87cyyhc7uu.fsf@dataswamp.org> <83ttrsg9nx.fsf@gnu.org> <83h6nrg4eg.fsf@gnu.org> <83v8c7elan.fsf@gnu.org> <877conk5ny.fsf@localhost> <83ttrreeu0.fsf@gnu.org> <87bkdzeas1.fsf@localhost> <83cyyfe5l8.fsf@gnu.org> <87led2o0nb.fsf@localhost> <83ttrqcpfb.fsf@gnu.org> <877comnv4a.fsf@localhost> <83fs3ackrq.fsf@gnu.org> <99e84ae7-b3aa-a009-5cb8-a75826343196@gutov.dev> <838r92cgxp.fsf@gnu.org> <837comcam8.fsf@gnu.org> <6946e6f0-c6ef-186c-35d4-c09935c05a07@gutov.dev> <83y1h1axtq.fsf@gnu.org> <87sf79rq5o.fsf@yahoo.com> <83fs38c2yv.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2412"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: yantar92@posteo.net, acm@muc.de, incal@dataswamp.org, emacs-devel@gnu.org To: Eli Zaretskii , Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 20 21:40:54 2023 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 1qj348-0000O8-DD for ged-emacs-devel@m.gmane-mx.org; Wed, 20 Sep 2023 21:40:53 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qj33G-0006Xw-9g; Wed, 20 Sep 2023 15:39:58 -0400 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 1qj33E-0006Xo-8u for emacs-devel@gnu.org; Wed, 20 Sep 2023 15:39:56 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qj33C-0005oF-3r; Wed, 20 Sep 2023 15:39:56 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 39FDB5C017D; Wed, 20 Sep 2023 15:39:51 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 20 Sep 2023 15:39:51 -0400 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:sender:subject:subject:to:to; s=fm3; t= 1695238791; x=1695325191; bh=iHIuqrsnD+Ww6f4mUdJrxfbMsaWEi4TU4s/ 1tQRR9M0=; b=knuDgNX0Ny/tj/IxGbi9pteadFPNT5iBPL4IgUQxUltLsp4+KnV X9+sZ/vaYoPMbFC+5N985FCAcMwun5xrjghKuQGi3vJw/AAe2m1R5jhp1tHJDXwG bPQAOcLH9/5/OOmKZPy9c0KHda6eo1dzTxyXuKv0hMo6vRZVzoXKHnl/2PUAcN1q k0+q172JGTCGUu+IWt132usOF5rZo7GmkJ6Jc5I0NjHVpMY5wHQy1nr/mPoFavZe acYADYgJw+FKeLwfdqslQQUxJeC61gUHalv44RmL8zmV+biQ8w1lgRyJYdpbec5X DKIfVxFDlXlGTWYtDnT4lmFK2bVNbd8cGFw== 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:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1695238791; x=1695325191; bh=iHIuqrsnD+Ww6f4mUdJrxfbMsaWEi4TU4s/ 1tQRR9M0=; b=SjK8eFL6IP1LdmeOlJ6/7lqoDexe4evlZ2CEntdIHzxKWgDepXa Wen1nhzTJs2V30iLiYHbi18vdobY/7LJ4gAeanbwztN83cJDkh+edboEXnI1thFY VWAd7sSA3E1xbBffzKrBNTrpVSc827a00ZRlkRjs0IKQURfE18JvpIZzpLdb87FH leLJ/0pr5FLRokZOiWRf6xdV6Mccnv2zc3zGiMtBJeiWywvadzit9utLBSmZa/AA GwUnf3UPLhWZh8e9NOFCs3m1im5q3AyKKTWCxaq67jVgibgtOSobAsw7NZYTk6ac 5fXMEG0nSGHPZiaoXV9dy5/3Ej1ngIPLmGQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudekfedgudegudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpeekjeegleegvdefleehgeefieffhefhtdeitdffheekfefftdfgieeuieeg tedtfeenucffohhmrghinheprhgvugguihhtrdgtohhmnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 20 Sep 2023 15:39:49 -0400 (EDT) Content-Language: en-US In-Reply-To: <83fs38c2yv.fsf@gnu.org> Received-SPF: pass client-ip=66.111.4.27; envelope-from=dmitry@gutov.dev; helo=out3-smtp.messagingengine.com X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 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, NICE_REPLY_A=-1.473, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-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.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:310853 Archived-At: On 20/09/2023 17:51, Eli Zaretskii wrote: >> Emacs is not a video game, for which the touchstone of performance is a >> measurement taken in ``frames-per-second''. It is a text editor that >> only updates the display subsequent to an editing operation. That is, >> unless you perform more than 60 edits per second and expect an >> intervening redisplay after each edit. > This sounds as if you are talking about something other than Emacs, > really. Try running some day with all the redisplay optimizations > turned off and with enough windows/frames visible, and you will see > how far we are from 60 fps goal. There's a lot of room for > improvement even without being a video game, just an editor. > > Or visit Reddit and see how many users complain that Emacs is slower > in displaying stuff than, say, VSCode. I see those voices, and see the couter-opinions as well. But note that those that do complain so are likely comparing the simple case of one-buffer-one-frame (so redisplaying multiple windows in parallel wouldn't quite fix that). So their complaints can be compounded from different things: - Anybody using CC Mode with large files might notice latency during editing from running before/after-change-functions (because its design involves keeping the syntax info up-to-date in the whole buffer). - People using LSP likely see better performance because of VC Code being able to parse the server's output in a different thread (or web worker? I haven't seen the exact design). LSP-Mode folks wrote a POC branch of Emacs which parallelizes the JSON parsing as well: https://www.reddit.com/r/emacs/comments/ymrkyn/async_nonblocking_jsonrpc_or_lsp_performance/ Some work toward mainlining this feature (perhaps after generalizing) could help. Or maybe the "multiple concurrent interpreters" approach could yield similar gains. - The "snazzy" mode-line packages sometimes slow things down more than expected.