unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>,
	emacs-devel <emacs-devel@gnu.org>
Subject: Re: jit-lock-antiblink-grace
Date: Tue, 15 Oct 2019 00:29:51 +0100	[thread overview]
Message-ID: <CALDnm53RyTVSopHHXcKoAHQDbbGvYZ--CCMML7NQHxDxsaLJNw@mail.gmail.com> (raw)
In-Reply-To: <83k198ly94.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2158 bytes --]

On Sun, Oct 13, 2019 at 11:45 AM Eli Zaretskii <eliz@gnu.org> wrote:
> > ? Or should I add a `redisplay` or something else there?
> For timing the effect of post-command-hook, you need to actually
> invoke many commands.  I suggest to lean on the DOWN arrow for a fixed
> amount of time, say, 30 sec, and see how far into the file did you go,
> and what was the average CPU load (e.g, as shown by display-time-mode
> or by 'top').

OK, I found some time to run these "manual" tests:

So I tried this with and without the hook. I removed it (forcibly) with

 (remove-hook 'post-command-hook
               'jit-lock--antiblink-post-command t)
and re-added it with

 (add-hook 'post-command-hook
           'jit-lock--antiblink-post-command nil t)

before beginning the test.

I confirmed that without the hook the feature is crippled and fails, and
with the hook it works fine.  This was easier then launching separate
emacsen with jit-lock-antiblink-grace customized differently.

60 second-long C-n in src/xdisp.c,
  without antiblink: line 706, avg load 4%
  with antiblink: line 717, avg load 4%
30 second-long C-n in lisp/minibuffer.el,
  with antiblink: line 366, avg load 4%
  without antiblink: line 361, avg load 4%

Time to end of buffer with C-v in lisp/minibuffer.el:
  with antiblink: 10 seconds, avg load 6%
  without antiblink: 10 seconds, avg load 6%

Time to end of buffer with C-v in src/xdisp.c:
  without antiblink: 90 seconds, avg load 8%
  with antiblink: 91 seconds, avg load 8%

I ran this with Emacs -Q with git commit
079461b360a2467ff4ab2ec57516c6f9e45f50fe on a 2013 Macbook Air running
Mojave.

The CPU load averages are computed "in my mind" from looking at top(1)
output. Times are taken from a wristwatch.  Thus, not really precise
measurements at all.  So, because these tests are kind of boring to
conduct, I'd like you or someone else to reproduce (or fail to
reproduce) one or two results before going any further.

Nevertheless, I'd risk saying that your worries about the performance
impact on these particular "paging" operations may not materialize at
all.

João

[-- Attachment #2: Type: text/html, Size: 2471 bytes --]

  reply	other threads:[~2019-10-14 23:29 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 22:34 jit-lock-antiblink-grace João Távora
2019-10-11 14:26 ` jit-lock-antiblink-grace Stefan Monnier
2019-10-12  9:34 ` jit-lock-antiblink-grace Eli Zaretskii
2019-10-12 10:57   ` jit-lock-antiblink-grace João Távora
2019-10-12 13:02     ` jit-lock-antiblink-grace Juanma Barranquero
2019-10-12 13:14       ` jit-lock-antiblink-grace João Távora
2019-10-12 14:50         ` jit-lock-antiblink-grace Juanma Barranquero
2019-10-12 15:11           ` jit-lock-antiblink-grace João Távora
2019-10-12 15:30             ` jit-lock-antiblink-grace Juanma Barranquero
2019-10-12 13:32     ` jit-lock-antiblink-grace Eli Zaretskii
2019-10-12 14:13       ` jit-lock-antiblink-grace Stefan Monnier
2019-10-12 14:23         ` jit-lock-antiblink-grace Eli Zaretskii
2019-10-12 14:34           ` jit-lock-antiblink-grace Stefan Monnier
2019-10-12 15:57             ` jit-lock-antiblink-grace Eli Zaretskii
2019-10-12 17:16               ` jit-lock-antiblink-grace Stefan Monnier
2019-10-12 17:50                 ` jit-lock-antiblink-grace Eli Zaretskii
2019-10-12 15:47         ` jit-lock-antiblink-grace Alan Mackenzie
2019-10-12 14:23       ` jit-lock-antiblink-grace João Távora
2019-10-12 16:04         ` jit-lock-antiblink-grace Eli Zaretskii
2019-10-12 21:55           ` jit-lock-antiblink-grace João Távora
2019-10-13  6:39             ` jit-lock-antiblink-grace Eli Zaretskii
2019-10-13  8:47               ` jit-lock-antiblink-grace João Távora
2019-10-13  9:22                 ` jit-lock-antiblink-grace Eli Zaretskii
2019-10-13 10:28                   ` jit-lock-antiblink-grace João Távora
2019-10-13 10:45                     ` jit-lock-antiblink-grace Eli Zaretskii
2019-10-14 23:29                       ` João Távora [this message]
2019-10-15  6:48                         ` jit-lock-antiblink-grace Eli Zaretskii
2019-10-15 18:28                           ` jit-lock-antiblink-grace João Távora
2019-11-24  1:04                             ` jit-lock-antiblink-grace João Távora
2019-11-24 16:16                               ` jit-lock-antiblink-grace Eli Zaretskii
2019-11-25 18:46                                 ` jit-lock-antiblink-grace Alan Mackenzie
2019-11-25 19:02                                   ` jit-lock-antiblink-grace João Távora
2019-11-25 19:26                                     ` jit-lock-antiblink-grace Alan Mackenzie
2019-11-25 19:45                                       ` jit-lock-antiblink-grace João Távora
2019-11-25 20:11                                         ` jit-lock-antiblink-grace Alan Mackenzie
2019-11-25 20:23                                           ` jit-lock-antiblink-grace João Távora
2019-11-25 21:07                                             ` jit-lock-antiblink-grace João Távora
2019-11-26  2:30                                               ` jit-lock-antiblink-grace João Távora
2019-11-26 17:58                                                 ` jit-lock-antiblink-grace Eli Zaretskii
2019-11-30 19:11                                                   ` jit-lock-antiblink-grace João Távora
2019-11-30 19:22                                                     ` jit-lock-antiblink-grace Eli Zaretskii
2019-11-30 20:12                                                       ` jit-lock-antiblink-grace João Távora
2019-11-30 20:16                                                         ` jit-lock-antiblink-grace Eli Zaretskii
2019-11-30 20:19                                                           ` jit-lock-antiblink-grace João Távora
2019-11-30 20:41                                                             ` jit-lock-antiblink-grace Eli Zaretskii
2019-11-30 22:00                                                               ` jit-lock-antiblink-grace João Távora
2019-12-01 18:13                                                                 ` jit-lock-antiblink-grace Eli Zaretskii
2019-12-04 22:45                                                                   ` jit-lock-antiblink-grace João Távora
2019-12-05 15:40                                                                     ` jit-lock-antiblink-grace Eli Zaretskii
2019-11-26 13:43                                           ` jit-lock-antiblink-grace Stefan Monnier
2019-11-25 19:47                                       ` jit-lock-antiblink-grace Dmitry Gutov
2019-11-25 20:03                                         ` jit-lock-antiblink-grace João Távora
2019-10-12 16:14         ` jit-lock-antiblink-grace Alan Mackenzie
2019-10-12 22:26           ` jit-lock-antiblink-grace João Távora
2019-10-13 10:18             ` jit-lock-antiblink-grace Alan Mackenzie
2019-10-13 10:48               ` jit-lock-antiblink-grace João Távora
2019-10-13 12:02 ` jit-lock-antiblink-grace Alan Mackenzie
2019-10-13 19:57   ` jit-lock-antiblink-grace João Távora

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=CALDnm53RyTVSopHHXcKoAHQDbbGvYZ--CCMML7NQHxDxsaLJNw@mail.gmail.com \
    --to=joaotavora@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).