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: Question about =?utf-8?Q?=C3=BCarent-frame?= changes Date: Wed, 25 Sep 2024 13:13:09 +0200 Message-ID: References: <9bc2af0a-d3c1-4ba6-a350-af6e2b85695d@gmx.at> <87y13phwbk.fsf@gmail.com> 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="40686"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: martin rudalics , Emacs Devel To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 25 13:15:13 2024 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 1stPzD-000AQH-2N for ged-emacs-devel@m.gmane-mx.org; Wed, 25 Sep 2024 13:15:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1stPyM-00072E-CD; Wed, 25 Sep 2024 07:14:18 -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 1stPxO-0001Tu-Kf for emacs-devel@gnu.org; Wed, 25 Sep 2024 07:13:19 -0400 Original-Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1stPxN-00046o-34 for emacs-devel@gnu.org; Wed, 25 Sep 2024 07:13:18 -0400 Original-Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-42cb806623eso57351335e9.2 for ; Wed, 25 Sep 2024 04:13:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727262792; x=1727867592; 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=B4/n/3qgHSAb7xK1K9OWJkwHDO72eqw1lApEfrndy/U=; b=LEv4wtnAGukZ1u7bwD291rrC92THMfXFM88GM/YAjIsuc5POIpn/SGTgzK4B6n1xPy 6XsUTcdcq77UVUlYV3iTCHBFVVOG3s6MwGw3ZsZkLgdmwZRZ/D3fLoFDd7DTh9+SjJN6 z0DhPNRIKUfte+kmEnqy4wGLzQdPIb4EicrH65MOtGRRGUnmmQ/knB7OWF6n4PXWiLdd Z7FZH0+MELOiEPRuUrxuFTVRpiIAvGMdGAQdRPrz8TZykf7M35WObGl5T7vjxH3Au0On 5MWXmhCSzXAAS2nRq6YqpuOV4X/5kluywpzPP0d4SXUF2oHBh+PWYexubARXJwGdlo83 pk1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727262792; x=1727867592; 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=B4/n/3qgHSAb7xK1K9OWJkwHDO72eqw1lApEfrndy/U=; b=nJiaBV8QYBBFXLEQitkpRDayVr9blNpDlSoF568F0p9KyjpVf0biBd/liiBj/xNca2 DbSm9luBXO2Kh/hJ0OqeA/uZxKjz+pJ6OxsKd2oMTMQKhuUDrMIMBwbVIM84QnY9vqLi 2Ig7Du1iwDWIU90ais6eZBHNuzE76bW5BiwugmOWT1HPuNPCvOfhucDFPgGtjJq2TdhK TaAsu2/JoR+7CHKKZr22yoxve4TWp1/gDJN2F4PTROdJUZj9le52ErdvknK1FD3GlA+f 5Hc24BpblX8/V8/Fxru+lWpbYQ77LEmWU/6gtEroLppVRmam8hhKVgwoAfxKfLGWRLt0 kiaA== X-Forwarded-Encrypted: i=1; AJvYcCWCntZSXCAogNGaxK6+1hwhWkudqjEeCY+ygQ7gxpSV20EeLCnI4qKwUqQ8VH5QniSU2YzYbvqgpqGBmQ==@gnu.org X-Gm-Message-State: AOJu0Yzpef8v5UDbSPif98Fd2oKVMPrpd6hSmEaF/FEIR6p7ZYtWVmfo zpHqFL86m43tvlooX4vCkwjxL/4xK5QGfYxL8Om85gpQssQK8NQynO8nHg== X-Google-Smtp-Source: AGHT+IF236qqfa478D/F54NnyqREOs0IgHxKA6ktPpHcQr0L7IqiGKmwxxzP1YZHILJP3F7AWjyDtQ== X-Received: by 2002:adf:ab16:0:b0:374:bfc4:b62f with SMTP id ffacd0b85a97d-37cc2465055mr1365430f8f.3.1727262791906; Wed, 25 Sep 2024 04:13:11 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a285.dip0.t-ipconnect.de. [79.227.162.133]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e96a54dedsm14869645e9.44.2024.09.25.04.13.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Sep 2024 04:13:10 -0700 (PDT) In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llman?= =?utf-8?Q?n=22's?= message of "Wed, 25 Sep 2024 12:17:14 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=gerd.moellmann@gmail.com; helo=mail-wm1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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, SPF_HELO_NONE=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:324060 Archived-At: Gerd M=C3=B6llmann writes: > Gerd M=C3=B6llmann writes: > >> Robert Pluim writes: >> >>> martin> Reparenting is useful because you can set up one child fram= e for some >>> martin> special purpose, make it invisible when you don't need it, = and move it >>> martin> to another frame and make it visible there whenever you wan= t to. On >>> martin> GUIs, this approach has the advantage that you can avoid th= e (at least >>> martin> here) costly process of setting up frame faces every time a= new. Emacs >>> martin> tooltips do that by default and I recall that showing a too= ltip every >>> martin> time incurred two entire GC cycles here. >>> >>> Would setting up frame faces be that expensive on tty? I=CA=BCd really = love >>> to have tty child frames, even if they were not blazingly fast. >> >>> From what I've seen so far, it's pretty fast, but OTOH my machine is >> pretty fast (M1 pro). Let's see how it does when I'm a bit further. At >> least hiding frames on ttys should be there before I can really try it >> with posframe. Maybe also moving/resizing also. > > I think I can say now that it will probably be faster than on GUI, at > least on macOS. Running > > (defun my-make-child () > (interactive) > (make-frame `((parent-frame . ,(selected-frame)) > (background-color . "gray10") > (foreground-color . "white") > (top . 15) > (left . 40) > (width . 80) > (height . 25)))) > > (defun my-time-child () > (interactive) > (dotimes (i 500) > (let ((f (my-make-child))) > (sit-for 0) > (delete-frame f)))) > > (benchmark-run 1 (my-time-child)) > > shows 24s with GUI, and 8s on tty. I'm using Alacritty, in case that matt= ers > (for the KKP keyboard support, not for performance). Small correction - I had timed tty build with debug. It's actually 2s instead of 8s.