From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: Emacs design and architecture Date: Sun, 17 Sep 2023 09:34:27 +0200 Message-ID: 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 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1212"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Yuri Khan , dmitry@gutov.dev, owinebar@gmail.com, rms@gnu.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Sep 17 09:35: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 1qhmJl-00005e-H0 for ged-emacs-devel@m.gmane-mx.org; Sun, 17 Sep 2023 09:35:45 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qhmIh-0005PV-3R; Sun, 17 Sep 2023 03:34:39 -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 1qhmIf-0005LY-AQ for emacs-devel@gnu.org; Sun, 17 Sep 2023 03:34:37 -0400 Original-Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qhmIa-0004u1-Fr; Sun, 17 Sep 2023 03:34:35 -0400 Original-Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-530a6cbbb47so1895382a12.0; Sun, 17 Sep 2023 00:34:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694936070; x=1695540870; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dftoZhsqCvez8B+Wl5ptH13A70xqDxRSq62zsF9Qi0U=; b=nOV/szINO/BhJVJ9xHc7buXFzDpatuV/FXqhi9czzin0SyE8cCgjn1pE8yDm3sjm97 oNFt1hr3jjhuRuvS1higCPIBCGMU5FemaTkKTu7esdvkOmUhb/YKuLrs3LN5nlRZkwsh XxvKJNIR+p84AwkO4svBOo59IT+nkzR9B6fKGilIjwRpeU9Uf9QtUgQQALfDGj+cuZha 2HgLx3vjPsBoh23yRtNtcbod1aLOTVeinjAv12BPyYvKPyXpJQ+Xd1qhOiUCj6lYN2Zz K8iIIQWYNCIy9yWlmkE9xpl6DdyyPfbLqze9verZWT30NeV1bOcRGGrXKTHrfond7kI9 ymNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694936070; x=1695540870; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=dftoZhsqCvez8B+Wl5ptH13A70xqDxRSq62zsF9Qi0U=; b=fELBD+qLeGVkCY/xkttAfQyuVK0geYMsQz80TeRLHTH9k7pcUAsUy4U4pjCj3U9IPx AJuAk+5ebRrz6EAdq1xWc+vsKE/6+nX+/Cx0TFmhvLSIieZmHAvv/c4pTK+oIMWNcOfl 4JxUliEeN/rApbt7eS7EZM0xnO8GuEblt6JjKw1wbGk1XYhkw+b3W4V20YwxxTExV3XH 5jBsLcCFk29SU3kytCELHOCexGOl6lWtalMsJuO9QIwp9NVGMKU6PKL+9/SlGZ3YEOlX wIqhZv0tQ4GFWoth5fh03bruL5BWQcruFul/vKXmBcznMx8p5uIwxoQbUJehYdkfLIfs Bt7g== X-Gm-Message-State: AOJu0YxIVrg5WOEUY+X3QafbPA2pDLc5XPOqhiPrbpcgGA2fKqBeE0WO Q8hnup5h9seNCJtMv9Ecz8FBDfsK3MerN67C X-Google-Smtp-Source: AGHT+IF8ffUJRUADLxhlSqVKRz5DpKF5JOrDj9Z8i4OV+Ck1ku7LTIbQSpcaLdAf3zXx3kRHX9OMAA== X-Received: by 2002:a17:906:209b:b0:9a9:fa50:1fa8 with SMTP id 27-20020a170906209b00b009a9fa501fa8mr5612876ejq.40.1694936069506; Sun, 17 Sep 2023 00:34:29 -0700 (PDT) Original-Received: from Pro.fritz.box (p4fe3ac93.dip0.t-ipconnect.de. [79.227.172.147]) by smtp.gmail.com with ESMTPSA id gy18-20020a170906f25200b009a9fbeb15f5sm4626038ejb.46.2023.09.17.00.34.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Sep 2023 00:34:28 -0700 (PDT) In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llmann?= =?utf-8?Q?=22's?= message of "Sat, 16 Sep 2023 11:09:09 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=gerd.moellmann@gmail.com; helo=mail-ed1-x532.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URI_DOTEDU=1 autolearn=no 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:310655 Archived-At: Gerd M=C3=B6llmann writes: > Gerd M=C3=B6llmann writes: > >> This of course, would pose several problems. >> >> - This form of parallel redisplay cannot call Lisp, so no jit-lock, no >> hooks, or whatever during redisplay. And at the point where we call >> redisplay today we don't know what will be displayed... >> - Parallel redisplay also needs either a copy of what it to be >> displayed, or the model must be some persistent data structure >> that makes immutable versions of buffer-text, for instance, >> available. > > Some more idle musings: > > Let's say persistent data structures for buffer-text, overlays, text > properties and maybe other things are out of question because of the > effort involved. > > Another idea would be to produce, where we currently run redisplay, a > "model" that can be processed concurrently. One could just guess how > much text will be displayed, run Lisp code as necessary (jit-lock), skip > invisble text, and so on, so that the parallel redisplay doesn't have > the need to call Lisp. For simplicity, think of that new form of model > as HTML. > > That could be so slow that parallelism is not a win. > > What about the move_.* functions used by Lisp (vertical-motion, ...)? > To what degree does backward compatibily restrict what can be done in > the first place? I'm beginning to think it sets quite harsh limits. > > Doesn't look good to me :-(. Here are some things I found wrt to buffer-text implementation. A ninteresting paper about text representations in general: https://www.cs.unm.edu/~crowley/papers/sds.pdf Piece tables: https://www.averylaird.com/programming/the%20text%20editor/2017/09/30/the-p= iece-table An implementation: https://github.com/cdacamar/fredbuf Something like that could be an inspiration for a persisten buffer-text implementation, which I think would be a prerequisite for a parallel redisplay. (I don't believe in the idea of a snapshort model for parallel redisplay =07anymore). This would not solve overlays, text properties and what not, of course.