all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marcelo Toledo <marcelo@marcelotoledo.com>
To: emacs-devel@gnu.org
Subject: set-window-margins: lag moving cursor?
Date: Wed, 6 Feb 2019 18:09:15 -0200	[thread overview]
Message-ID: <870DE425-F7E4-4C05-9F24-CCA80D45BE93@marcelotoledo.com> (raw)

Hi,

I've recently noticed a lag moving cursor around. When trying to track down the problem I’ve noticed that it was related to set-window-margins.

Why am I using set-window-margins? 

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 <down>. 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 in advance


             reply	other threads:[~2019-02-06 20:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-06 20:09 Marcelo Toledo [this message]
2019-02-07 14:34 ` set-window-margins: lag moving cursor? Eli Zaretskii
     [not found]   ` <CEF03650-8BB9-4D57-9B34-980266A104E4@marcelotoledo.com>
     [not found]     ` <4A53CAA5-EB34-4291-AE56-2D7C0D592A29@marcelotoledo.com>
2019-02-08 21:10       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=870DE425-F7E4-4C05-9F24-CCA80D45BE93@marcelotoledo.com \
    --to=marcelo@marcelotoledo.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.