From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: 27.0.50: How can I test a buffer-local window-configuration-change-hook in batch mode? Date: Sat, 26 Oct 2019 13:14:22 -0400 Message-ID: References: <83ftjixlwh.fsf@gnu.org> <72dda818-78b6-953f-ba5c-e2e1c81c036e@orcon.net.nz> <93cb893c-a77d-112e-e84c-e4f358686abd@gmx.at> <7c3b27d1-7be1-b1de-ae85-728d11f0e771@orcon.net.nz> <474b5ee0-d765-03fd-51df-789532a9fd32@gmx.at> <83tv7vvpqv.fsf@gnu.org> <46229722-5fd5-f1a3-c7d7-96f3f5e05ad8@orcon.net.nz> <83d0ejvj91.fsf@gnu.org> <837e4rvg9s.fsf@gnu.org> <83mudntqrj.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="19664"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: psainty@orcon.net.nz, rudalics@gmx.at, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 26 19:15:07 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iOPeb-0004vC-ME for ged-emacs-devel@m.gmane.org; Sat, 26 Oct 2019 19:15:06 +0200 Original-Received: from localhost ([::1]:41024 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOPea-0000YU-0z for ged-emacs-devel@m.gmane.org; Sat, 26 Oct 2019 13:15:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36200) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOPe4-0000Ld-5X for emacs-devel@gnu.org; Sat, 26 Oct 2019 13:14:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOPe2-0005QB-3Q for emacs-devel@gnu.org; Sat, 26 Oct 2019 13:14:31 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:37335) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOPdy-0005OX-Dm; Sat, 26 Oct 2019 13:14:26 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 7F001449442; Sat, 26 Oct 2019 13:14:25 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 3C72644942B; Sat, 26 Oct 2019 13:14:24 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1572110064; bh=53tBpemZUrmAQLtiiEkA35ze18NeyN0zM6thl05+wDg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=fHozrCnTsdtscoy8ZgTBgBOmCUd9EHWNHyawOF3M51bdfOMlgmVytDqxh+bziHfXR TMGiIyZMlw6Y+KmJASGq4rJTxNpJ67nM7KMtaFtdvC7gD7BNveSlfOcJZCfsSJ4r9j xnz7SdlbPaH/MrQwv6W6iVtw8g2TJmiX+4IJHt1TFbEtIHY73+t9iV5Tw5prS8p0El akRF0A4b/VXkatR69BHkcaeZQdZwIBRgVuYBeqepyPwAoSt2dyMZslPKYQEVHynL75 pl3XwHXjgsbNJ1CebrS4Z8fSaAnrITPrpqbxoPd6d3y0yR6fLyKKZ1Rc+LdoDpxzQ+ XM9ofjiGFBMaQ== Original-Received: from pastel (unknown [216.154.30.71]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E311B120310; Sat, 26 Oct 2019 13:14:23 -0400 (EDT) In-Reply-To: <83mudntqrj.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 26 Oct 2019 19:28:48 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:241473 Archived-At: >> It's virtually impossible to determine reliably when it's better to use >> so-long and when it's better not to. So theory is not super relevant >> compared to actual practical experience. > Agreed. My point is that whatever the decision, I don't think I > understand (or agree) with it being different for displayed and > non-displayed buffers, for reasons I explained. Most of the slowdown is linked to code related to the display, in my experience. And if you look at the three functions you mention: - next-line is very rarely called as a function (C-h f suggests to use forward-line instead in Lisp code), so it's virtually never used in non-displayed buffers. - posn-at-point doesn't return useful information AFAICT in non-displayed buffers. - for vertical-motion it's not as clear, but a quick grep suggests that it's also rather unusual to call it in a non-displayed buffer. Stefan