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: Tue, 19 Sep 2023 19:01:31 +0300 Message-ID: References: <83edizjn0v.fsf@gnu.org> <0518f65b-1dd1-6923-8497-da4d3aeac631@gutov.dev> <87sf7fc7kd.fsf@dataswamp.org> <834jjuk68t.fsf@gnu.org> <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> 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="12263"; 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 Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 19 18:03:27 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 1qidCA-0002qW-8N for ged-emacs-devel@m.gmane-mx.org; Tue, 19 Sep 2023 18:03:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qidAU-0002a0-Mf; Tue, 19 Sep 2023 12:01:42 -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 1qidAQ-0002Z3-Lp for emacs-devel@gnu.org; Tue, 19 Sep 2023 12:01:38 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qidAO-00026J-BN; Tue, 19 Sep 2023 12:01:38 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id E64E45C006B; Tue, 19 Sep 2023 12:01:34 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 19 Sep 2023 12:01:34 -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= 1695139294; x=1695225694; bh=0ubJxF0breatZkV6uwstK9uwYfzbg18MIuI R/x+mqrU=; b=bI1TntIauOfdFtDm9CLB89Qmm39VjVxOiaTwMVbhlQRywKA5smm 6ZGmTfSbhtoMMhnBFgbDRVt5OlU4gTzXAfFyyEtCaJa6iORipz/XYmcwhNnc3xJc VWwltIVhG/o+HWuxwCqusAuH0BxvChnikKw3IKZzqMADpUSnYmoY2edNu5kqPwvS be061yaw36WH8xSDVYl91ks31kGHLAmRwx/1gORYnVohd54nb/S1CpE6ngySDR6b vhrOIJX4EP9quxWFpiw98q0aah/5t2mvolif6uSb0UeczxbE7GuXhZfX+NmvwRz7 E7t/PQL3HxGay4SGdm0HOQhh923iVs7qulA== 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= 1695139294; x=1695225694; bh=0ubJxF0breatZkV6uwstK9uwYfzbg18MIuI R/x+mqrU=; b=JvQk09GrX+fIvPnbHgnnTjNA8yCmOsV/vl6ptwTJxhBYzyjHXoN SuW/9c/1PowKGIDpy0T1ysvwSNH/wfGIPjtwGwaY05Bb+eN4/zk17uruh88Jfl7I BZ8Xx04SgkBNasTCDb/WZuL/+LMXLH/MRibuT7Ge6FnXyjhfwxxal5HNCcOBjRfx 4JY/rt4aC4upgWDhv18wdbblzGXrjtMip9U/COkK603MjnGIFzBnz4Z5wr/roEdO xXo+I8mN/mwmBEC2H7BprKMeRReGr6lY2mRDKwN4N5nq7EJHBUdoTtRikgbLWFik Vr6zqm2fYbkRUAM7q+G8F5obSdWa1RJNQrA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudekuddgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 19 Sep 2023 12:01:32 -0400 (EDT) Content-Language: en-US In-Reply-To: <838r92cgxp.fsf@gnu.org> Received-SPF: pass client-ip=66.111.4.28; envelope-from=dmitry@gutov.dev; helo=out4-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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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:310783 Archived-At: On 19/09/2023 18:37, Eli Zaretskii wrote: >> Date: Tue, 19 Sep 2023 18:15:50 +0300 >> Cc:acm@muc.de,incal@dataswamp.org,emacs-devel@gnu.org >> From: Dmitry Gutov >> >> On 19/09/2023 17:14, Eli Zaretskii wrote: >>>> This is very simple - I suggest to not touch xdisp.c as much as >>>> possible, just make sure that it is interlocked. And focus on async >>>> support in Elisp code. Once there is async support in Elisp code, we can >>>> move further and look into xdisp. >>>> >>>> (I suggest this because I feel that xdisp is a rabbit hole we may sink >>>> in instead of doing something more productive) >>> I'm actually of the opposite opinion. I think trying to parallelize >>> redisplay is a lower-hanging fruit, and if successful, it could bring >>> non-trivial gains to Emacs even if the rest remains single-threaded. >> Do we have evidence that the speed of redisplay is a limiting factor in >> general Emacs usage? I.e. with an optimized build and most of the >> popular modes (excepting certain display-heavy Org buffers, let's say). > You already forgot the long-lines problems? The long-lines problem wasn't solvable with parallel redisplay either, it was a case of high algorithm complexity (a combination of them). > And there are other situations where we'd like faster redisplay, even > though they are not as bad. For example, when a session has many > frames (I believe Stefan Monnier tends to have a lot of them in his > sessions). To say nothing of the fact that displays become larger and > larger, and many people like to have their frames maximized. It would help to see some info on: - Whether Stefan's build is optimized, - How much time the many-frames case spends talking to the windowing system, compared to the time our redisplay takes internally. If there are many frames displayed, but the current buffer is shown in only one of them (or two, etc), then shouldn't the rest of the frames stay mostly still anyway? I also like to have my frames maximized, and I have a 4K display -- even so, redisplay seems to be mostly fine (with 1-2 frames anyway). But rendering large windows at high resolution, while it can be taxing, generally bottlenecks at something else than the layout algorithms. Unless you're arguing that the layouts are going to become more complex exponentially as well.