From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Marcelo Toledo Newsgroups: gmane.emacs.devel Subject: set-window-margins: lag moving cursor? Date: Wed, 6 Feb 2019 18:09:15 -0200 Message-ID: <870DE425-F7E4-4C05-9F24-CCA80D45BE93@marcelotoledo.com> Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="150054"; mail-complaints-to="usenet@blaine.gmane.org" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 06 21:11:36 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 1grTXi-000cnx-5o for ged-emacs-devel@m.gmane.org; Wed, 06 Feb 2019 21:11:34 +0100 Original-Received: from localhost ([127.0.0.1]:58025 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grTXh-0001Mr-4Q for ged-emacs-devel@m.gmane.org; Wed, 06 Feb 2019 15:11:33 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grTVa-0000V3-2r for emacs-devel@gnu.org; Wed, 06 Feb 2019 15:09:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grTVZ-0004xR-9F for emacs-devel@gnu.org; Wed, 06 Feb 2019 15:09:22 -0500 Original-Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]:35015) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1grTVY-0004x4-Of for emacs-devel@gnu.org; Wed, 06 Feb 2019 15:09:21 -0500 Original-Received: by mail-qt1-x82e.google.com with SMTP id v11so9423155qtc.2 for ; Wed, 06 Feb 2019 12:09:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marcelotoledo-com.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=BcMU508K56pBSd5v9tZ1S1Ncy5rhAwAjVCkpn/CjNy0=; b=xLBDpsDd1Ny6i6ZBml9pBM+46ZFdKxdYQ/lcbj/LVfXrx1FHsuTT7RYkxzabCz+V1U 7uviCVR5b44VDuqCvZhtAO5BO08FuAhdEBbZKvfLe0dtR0qKwdco8TRz6dT0i2IY4TcW j28Shl5K9cLzdO/ZOlM1r4My7EVk1INHQwdds8SOujI4+Fg51GC5uGvkpMvDvYNlbxHC +VOSWfYZ7J03VrJtgNWS3a6TAzV5WBI1bSCLhFvuVyPstCQYLPLMF0zohzoAzttD70OY +V/B6cu90u/cSwBGa7sg70g1D9cRVAtVsIHxpSFDDyl7wZ2GH9vvtP6qAqVCD0RoV9Fw KP0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=BcMU508K56pBSd5v9tZ1S1Ncy5rhAwAjVCkpn/CjNy0=; b=FBQRut1Q7kxnZtRy0BGknv3kVVoCJjRIp4ZSLYGOK+y610KtaDF6gV73iRsQsXBZFE JTDxDOBtfqSqnYj5IE9bDTkE9wiIGu+8L3pjPwH4NN9kqnE5xk5Fb2+8f2XCfYxSECGr 2oWkIT2xnn3u+UHCqmIWPFtYl2ptrBDhGAWeLtN6coOWoBj7y3O7vj0B2H+1H5AeH7uz /jeCYM9qwJ9zDSqBvSlc/NwhAyPqAl3HEUGqU7qVSzq7AHSm32Sra4KPNLXsrfSQKdJI vPTUFSb0Kea5F+01yK+7MoVYduBe/0JnHr8T6DxJSH9lQstS0hTAMpoDWu/kvWReTbjQ Y92A== X-Gm-Message-State: AHQUAub8gNFJG7zh0cQkJckZaVpjfrGtWRgojpeSa4M3ZRDE2Mnzu6Zj A3Kt5HXTcQxS6qG8lDaUFU45EBNPgXg= X-Google-Smtp-Source: AHgI3IbRRC//cC2K5C4tiCKGvs4gvT2DKMcdGGZ2QmiuHF1cYIkZACk+j8jAmDA+rSokS6pJ24fjYg== X-Received: by 2002:aed:2342:: with SMTP id i2mr9237308qtc.341.1549483758656; Wed, 06 Feb 2019 12:09:18 -0800 (PST) Original-Received: from [172.26.32.106] ([189.1.162.74]) by smtp.gmail.com with ESMTPSA id p47sm20103350qta.36.2019.02.06.12.09.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Feb 2019 12:09:17 -0800 (PST) X-Mailer: Apple Mail (2.3445.100.39) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::82e 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:233064 Archived-At: Hi, I've recently noticed a lag moving cursor around. When trying to track = down the problem I=E2=80=99ve noticed that it was related to = set-window-margins. Why am I using set-window-margins?=20 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=E2=80=99s 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=E2=80=99ve tested: * Mac OS X 10.14 * GNU Emacs 26.1 (latest stable version) * Build options: ./configure --build=3Dx86_64-apple-darwin = --without-dbus --with-ns In that environment I=E2=80=99ve tested speed of cursor moving around = random files.=20 How exactly I=E2=80=99ve tested?=20 I=E2=80=99ve set the cursor in the top of the buffer and measured the = speed to reach the buttom simply pressing the key binded to . = I=E2=80=99ve done that several times and calculated the average (it was = pretty steady). When I don=E2=80=99t have set-window-margins set it=E2=80=99s moving in = a regular speed. But whenever have set-window-margins set, it=E2=80=99s easy to notice a = ~ 25% reduction of speed moving cursor around. I=E2=80=99ve 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 in advance=