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: Thu, 21 Sep 2023 14:10:56 +0300 Message-ID: <7b0c07f5-88c8-4f2c-6ac6-a6112c884f32@gutov.dev> References: <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> <83o7hw9ee1.fsf@gnu.org> <87il84q845.fsf@yahoo.com> <83il849bx6.fsf@gnu.org> <87a5tfri8c.fsf@yahoo.com> <878r8z27cs.fsf@localhost> <44e98df7-f683-ac07-e644-40757f1d26f9@gutov.dev> <87msxfzts6.fsf@localhost> 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="20187"; 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: Po Lu , Eli Zaretskii , acm@muc.de, incal@dataswamp.org, emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 21 15:00:46 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 1qjJIT-0004zf-2S for ged-emacs-devel@m.gmane-mx.org; Thu, 21 Sep 2023 15:00:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjJI6-0000kt-Nj; Thu, 21 Sep 2023 09:00:22 -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 1qjJAl-0001c0-Jt for emacs-devel@gnu.org; Thu, 21 Sep 2023 08:53:34 -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 1qjJAX-0007KP-Hh; Thu, 21 Sep 2023 08:52:46 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 2267B5C00B3; Thu, 21 Sep 2023 07:11:00 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 21 Sep 2023 07:11:00 -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=fm1; t= 1695294660; x=1695381060; bh=uLC7gs8PVvZpufmDRItB0cCRT262cxZmzqm 079IzQfk=; b=1gSbM8BQVX/24qI/yL02CYcyR9/3UOI3iW8R2g6Hv97dlRONHAu 3vjTuS8S/V26owldTUeRVFu+nGYd0NRBda6LPO1P6O8mHBViPlfY1uk4q7SmsIHB CjB+MI5zie/KQXiYJw9w8fp/o2NCmcQAYbzch2vJpNo3pcLktPIXfqox4tXmm/h3 prJUuF6YBoYiyga3+ChSXJqsxVrc6XIdZSApg2iMTg0+6iUMtgxHCob6bCem8AOC 0dm+4s4mkpgvr5yhXWdrxGKhcE5AfKLcEU8WeIv+h4yspFHm4lHevhlys8xwkHaq SDr0mBFxTELNUm+bRAV3Lp21DVdg3ONt+SA== 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= 1695294660; x=1695381060; bh=uLC7gs8PVvZpufmDRItB0cCRT262cxZmzqm 079IzQfk=; b=HPErZW03GBavT+VWnAogq0efnRGPdDZ5uGpqkgZFpb5G8ZF2rcq oSRhGkX/8RyQA6YMVMtkjYDf4L/T0bMgjrawkvZpqHjUJiuWx8IhOtkeMDY9eMua N9OUUmeO0a+rYlZ4MV+WyZG6vUzDe4w/ND8Puz65jrJ/vFK2vMujzSYxgeKyJXa+ wyjSjrSN76xDi93eWYIbjRa6RlXbtT/t49ALHmlzZ1xpgSiDl+zv/cUt6GrnQ03n mWSqwY0hRcjnop/GVMFy0hV64LFA+jJthk2ptNw9+zIgaRTKGovoQFLSJxKD9Y44 jXyR6DDrTootZ6g1yeKs7yzXSmNJPZPmt9g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudekiedgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 21 Sep 2023 07:10:58 -0400 (EDT) Content-Language: en-US In-Reply-To: <87msxfzts6.fsf@localhost> 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:310890 Archived-At: On 21/09/2023 13:48, Ihor Radchenko wrote: > Dmitry Gutov writes: > >>> I think that there is at least one way to address long lines using >>> asynchronous redisplay - put a placeholder on the problematic line and >>> continue calculating the actual rendering in the background instead. >>> That will not force us to compromise between rendering time and >>> accuracy, as we do now, with long-line-threshold. >> Until you're laid out the long line, you don't know which screen line it >> will finish at, or at which height specifically (it might have images, >> or taller text due to faces, etc). So you can't render the remainder of >> the buffer either. > What I had in mind is the processing to happen in two stages: (1) > calculate "quick-and-dirty" layout; (2) start calculating "accurate" > layout. If calculating "accurate" layout takes long time, go ahead and > draw the "quick-and-dirty" version on the glass, while "accurate" > version continues being computed in the background. > > Of course, this threshold should be configurable. > >>> Similar approach might be used to render mode lines - render a >>> placeholder until it is fully calculated, keeping Emacs responsive. >> I hope by "placeholder" you mean the previous rendered image of it. > More precisely, what I had in mind is the old glyph matrix + some > indication that the rendering is not up-to-date (like classic sand clock > icon) Any visible indicators of incomplete layouts or "not yet updated" icons are going to be a visual nuisance if the refresh speed is still above 5fps. So we should be careful with those. And even the "slow" mode-line packages still manage to maintain at least 5fps, I believe.