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 Date: Fri, 15 Sep 2023 18:52:07 +0300 Message-ID: <43d642a8-d1b4-05ed-41e0-6e52d22df2d4@gutov.dev> References: <87fs3ur9u8.fsf@dataswamp.org> <875y4moiiq.fsf@dataswamp.org> <83r0n4rj78.fsf@gnu.org> <83cyynpmvd.fsf@gnu.org> <838r99mh40.fsf@gnu.org> <83h6nwlmt4.fsf@gnu.org> <456d12ac-ecf4-3de4-56bb-a2440580777f@gutov.dev> <83a5tokmsv.fsf@gnu.org> <83sf7fki5g.fsf@gnu.org> 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="15884"; 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: Yuri Khan , owinebar@gmail.com, rms@gnu.org, emacs-devel@gnu.org To: =?UTF-8?Q?Gerd_M=c3=b6llmann?= , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 15 17:53: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 1qhB8I-0003qN-Bi for ged-emacs-devel@m.gmane-mx.org; Fri, 15 Sep 2023 17:53:27 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qhB7N-0000Wx-L8; Fri, 15 Sep 2023 11:52:29 -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 1qhB7K-0000Wh-3w for emacs-devel@gnu.org; Fri, 15 Sep 2023 11:52:26 -0400 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qhB7H-0002JI-8g; Fri, 15 Sep 2023 11:52:25 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 7C1F85C0084; Fri, 15 Sep 2023 11:52:11 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 15 Sep 2023 11:52:11 -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= 1694793131; x=1694879531; bh=1d3uPYQnpsGPOnGcKjgivl04SkZIB629MGg j05Pyu4E=; b=Ifs7ixR6s5h0eU0uM5u5oPnVFDT4XsOF2jEPAVksujP1EYzbVrI aBxvc4pJ/Wilt7aG/ThI8gkT9u2aKoUp3BDYUR6yiUoZdUTtDL5tNlCTg5hxvrip B5UxCiJbMIY/9EDHezlyP0YgDmo/WuKo3JkhSiWTzsiWe0TikapprgxF5J6jGXEj ptcUvLGzOxzx7gxwyGg26L5fIf8QC9m7rwR7uVhXXCcNXgIacJbTwq9Hhwv5Zh1H +Qrw1CHVR+ODwmnyiOXkYNy9Aa32Vt4lEyFsLDzu0py7VNytFJn1yRtIJPR1OLl0 Ryccvkr14fOkgi6fnHAVT+rbAow+njbWZNw== 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= 1694793131; x=1694879531; bh=1d3uPYQnpsGPOnGcKjgivl04SkZIB629MGg j05Pyu4E=; b=P0oIoetBlYNwyljKv/l3LSS+lb4Xf3NJ0vbPKNqwueasWyiv7+3 IwT8Bne01sub/ZiXkcNYgU9ubf6b/qc6rbKlQibMY/8KMZBbGC3tFKeB0uo5hwEL UmE/ysbWM7F6VV+3IiNbAMSsqj5v4Hrw0JU8N0jAmJ7CYaFy5kA4ZW6I4uIoGuUW nphrFsejZRA9lLzNrJlQiN6yGilOMgVcBKN6IWTTYgwWWIY+Wz+jaO5rPZJpAcaC qpQyBtigbM7GqNaptKihCOpPaO1SRl+BbUY1uVr2reVTeheFhznp1E1Z3/C6t9un C94lJsAbkkbRBAj6IJQ34ev25D2qZcTtkmA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudejvddgleduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhephfffheeljeffgeffueeghfekkedtfffgheejvdegjeettdduheeufffggfef jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 15 Sep 2023 11:52:08 -0400 (EDT) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=66.111.4.25; envelope-from=dmitry@gutov.dev; helo=out1-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:310602 Archived-At: On 15/09/2023 12:32, Gerd Möllmann wrote: > I think it would maybe be good to think about the following: > > Random thoughts about a parallel redisplay, from a height of 10 km. > > What currently happens to bring changes to the screen is that redisplay > is called quite frequently in the course of processing input for > example. Redisplay determines what part of the a "model" (buffer) has > changed, if any. It makes sure that all info it needs to proceed is > available; think jit-lock, i.e. it calls Lisp. Because redisplay is > called frequently, it must minimize what it does, which is the reason > for the complicated optimizations there. > > Whatever is done in the end, I think it would first be necessary to > change this general principle, so that layout/drawing whatever can > happen in parallel. Without that, I suspect redisplay would get too > slow, or would finally collapse to a black hole by its complexity. I think it'd be an interesting project to study how an existing Emacs could output into a web page. Or a web driver, etc. How a "toolkit port" into HTML/JS could work. That system is historically more complex than what you described, including lots of callbacks, e.g. it might be possible to implement jit-lock using the 'DOMContentLoaded' and 'scroll' events. Consequently, though, parallel layout has been historically a hard problem for web browsers, but the current engines do that, at least to an extend (I think that was one of the selling features of Servo, later incorporated into Gecko). Complexity is definitely an issue, though.