From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: set-window-margins: lag moving cursor? Date: Thu, 07 Feb 2019 16:34:27 +0200 Message-ID: <835ztvsm4s.fsf@gnu.org> References: <870DE425-F7E4-4C05-9F24-CCA80D45BE93@marcelotoledo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="60309"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Marcelo Toledo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 07 15:46:51 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.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1grkww-000FRf-0j for ged-emacs-devel@m.gmane.org; Thu, 07 Feb 2019 15:46:46 +0100 Original-Received: from localhost ([127.0.0.1]:41354 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grkwv-0002Jh-1e for ged-emacs-devel@m.gmane.org; Thu, 07 Feb 2019 09:46:45 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37923) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grkl7-0002PB-DE for emacs-devel@gnu.org; Thu, 07 Feb 2019 09:34:34 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:52214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grkl7-0000FJ-6w; Thu, 07 Feb 2019 09:34:33 -0500 Original-Received: from [176.228.60.248] (port=2583 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1grkl5-0000Gk-LQ; Thu, 07 Feb 2019 09:34:33 -0500 In-reply-to: <870DE425-F7E4-4C05-9F24-CCA80D45BE93@marcelotoledo.com> (message from Marcelo Toledo on Wed, 6 Feb 2019 18:09:15 -0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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:233085 Archived-At: > From: Marcelo Toledo > Date: Wed, 6 Feb 2019 18:09:15 -0200 > > When I use really large monitors with GNU Emacs and only one window, I like to add margins left and right to align 100 columns of total width in the middle. Code gets centralized and it’s easier to code. > > Code I am using currently: https://github.com/marcelotoledo/centralized-mode > Code I was using before: https://github.com/rnkn/olivetti > > What environment I’ve tested: > > * Mac OS X 10.14 > * GNU Emacs 26.1 (latest stable version) > * Build options: ./configure --build=x86_64-apple-darwin --without-dbus --with-ns > > In that environment I’ve tested speed of cursor moving around random files. > > How exactly I’ve tested? > > I’ve set the cursor in the top of the buffer and measured the speed to reach the buttom simply pressing the key binded to . I’ve done that several times and calculated the average (it was pretty steady). > > When I don’t have set-window-margins set it’s moving in a regular speed. > > But whenever have set-window-margins set, it’s easy to notice a ~ 25% reduction of speed moving cursor around. > > I’ve been reading the source code and trying to figure out what exactly is the problem and I was wondering if anyone could help me understand why this is happening and what part of code is bringing this behavior. > > Happy to provide more data. Thanks. Please show a complete recipe to reproduce this problem, starting from "emacs -Q", including how you measured the speed. A 25% slowdown is not easy to spot, so I want to be sure I'm doing the same as you did to see the problem, and measure the same quantity. Up front, I don't see why cursor motion would be significantly slower with margins, but maybe I'm missing something.