From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Emacs design and architecture. How about copy-on-write? Date: Thu, 21 Sep 2023 10:25:26 +0300 Message-ID: <83o7hw9ee1.fsf@gnu.org> References: <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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22157"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dmitry@gutov.dev, yantar92@posteo.net, acm@muc.de, incal@dataswamp.org, emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 21 09:26:47 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 1qjE5G-0005Xr-7d for ged-emacs-devel@m.gmane-mx.org; Thu, 21 Sep 2023 09:26:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjE3x-00012Z-OB; Thu, 21 Sep 2023 03:25:25 -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 1qjE3w-00010i-6h for emacs-devel@gnu.org; Thu, 21 Sep 2023 03:25:24 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qjE3s-00047b-2K; Thu, 21 Sep 2023 03:25:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=jENi0UqSVQ6gx2gA1d+anJvjNZom0FuP/YYamz4oPFY=; b=JpDgAx/dtYQd N4BLANZrGz1t+Lr8eP7KAGvNJnkvByloJxFSLK/W1new/qiHFpGW4k4YqOfg6cC2QDNrdyVPQAQQ3 yVvQAZf+Z+TkF2FMenPXFOg9YezGLLr0+j4tMFkXGFXHJXQiUjFIignb7Je33LstHZmStDOmDCkAR bAQQvZECZVq2TPbENOrf5ix5xPVB/+vLCsurnzNs2Xtt9zpFf1NRZ17esJ7s2MCYGpJrgQeLq036s 4BLhNHdfC2BLmIugq9q8gp6m5TjgFsQcAoOsQDrytti57y2R7b/WyJNlFUoCCh9cc1P/acr9/RLui YsCXDMkzzbI5pAmpEO5Nfw==; In-Reply-To: (message from Po Lu on Thu, 21 Sep 2023 08:41:29 +0800) 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:310866 Archived-At: > From: Po Lu > Cc: dmitry@gutov.dev, yantar92@posteo.net, acm@muc.de, > incal@dataswamp.org, emacs-devel@gnu.org > Date: Thu, 21 Sep 2023 08:41:29 +0800 > > Eli Zaretskii writes: > > > 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. > > We don't have a "60FPS goal." "Frames per second" is a metric that > applies to programs which are perpetually redrawing their windows, > either as fast as the monitor refreshes or as fast as the CPU permits. We don't have to interpret "60 fps" too literally. A possible Emacs-friendly interpretation is "60 display updates per second", for example. Here's an experiment to try: (global-set-key "\C-z" (function (lambda () (interactive) (scroll-up 1)))) Then visit a large file and lean on C-z. Another possibility is to lean of C-v. > I don't type 60 characters per second -- so there is no reason for Emacs > to display at 60 frames per second. Leaning on a key, as in the examples above, will produce input events at a relatively high rate (albeit usually lower than 60 per sec), each one of them requiring some kind of redisplay. Even leaning on C-f triggers redisplay at high rate. I suggest to try this in various non-dash-Q configurations and see how we fare in these situations. There's nothing outlandish in expecting an editor to keep up with high-rate scrolling commands, I hope you agree with that at least. > > Or visit Reddit and see how many users complain that Emacs is slower > > in displaying stuff than, say, VSCode. > > I seriously doubt redisplay performance is the cause of their plights. You can doubt all you want, but some of what they say is definitely related to redisplay, IMNSHO. > There's also the old experiment where Eric Naggum disabled garbage > collection messages, yielding a visible speedup. That's orthogonal to the issue at hand.