all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: David Reitter <david.reitter@gmail.com>
Cc: alan@idiocy.org, andlind@gmail.com, emacs-devel@gnu.org
Subject: Re: Redisplay: NS port, high CPU load
Date: Tue, 14 Jun 2016 20:02:24 +0300	[thread overview]
Message-ID: <83mvmneman.fsf@gnu.org> (raw)
In-Reply-To: <5EBA241B-68F8-4A4D-BEAD-66EACD20333E@gmail.com> (message from David Reitter on Tue, 14 Jun 2016 20:07:01 +0800)

> From: David Reitter <david.reitter@gmail.com>
> Date: Tue, 14 Jun 2016 20:07:01 +0800
> Cc: Anders Lindgren <andlind@gmail.com>,
>  Alan Third <alan@idiocy.org>,
>  emacs-devel@gnu.org
> 
> OK, I looked into this.  I don’t have time right now for a recipe, but what’s happening is that I’m loading (my version of) tabbar.el, which does this:
> 
> (add-hook 'first-change-hook 'tabbar-window-update-tabsets-when-idle)
> 
> Only when first-change-hook is set are those extraneous toolbar refreshes made.  The tabbar-window-update function at some point calls  (force-window-update (window-buffer)), which may be what triggers the toolbar refresh.

OK, thanks, this explains everything.  Indeed, calling
force-window-update will cause the tool bar to be redisplayed.

> So, I think that we should think about disabling hooks such as buffer-list-update-hook, first-change-hook, kill-buffer-hook, for temporary buffers.  In my view it just does not make sense to run the hooks for temporary buffers in any sensible scenario.

I'm not sure I agree.  Forcing redisplay for such buffers might not
make sense in most situations (though again, I'm not sure it makes no
sense at all), but a hook could do anything at all, and I see no
reason to summarily disable it in such buffers.  I think it's up to
the hook function to be selective if needed.

> I also think that this change might affect some modes, if only by triggering bugs.  Therefore I would argue that the change to ucs-normalize is the minimal change to fix my bug, and a good housekeeping change in general.

I'm okay with the change in ucs-normalize, but I don't think we should
do that on the release branch.  The situation you describe is quite
specialized, and the solution that avoids excess redisplay is to make
the hook function more selective about the buffer in which it runs.

So I think we are okay with the change you committed to master, and
this bug could otherwise be closed.

Thanks for looking into this.



  reply	other threads:[~2016-06-14 17:02 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-08  6:04 Redisplay: NS port, high CPU load David Reitter
2016-06-08  7:50 ` Anders Lindgren
2016-06-08 10:44   ` David Reitter
2016-06-08 19:55     ` Alan Third
2016-06-08 20:12       ` David Reitter
2016-06-09  1:03         ` David Reitter
2016-06-09  8:22           ` David Reitter
2016-06-09  9:25             ` Anders Lindgren
2016-06-09 13:04               ` David Reitter
2016-06-09 14:11                 ` Anders Lindgren
2016-06-09 18:03                   ` David Reitter
2016-06-09 18:52                     ` Anders Lindgren
2016-06-09 23:03                       ` David Reitter
2016-06-10  6:02                         ` Anders Lindgren
2016-06-10  8:16                           ` David Reitter
2016-06-10  9:34                             ` Eli Zaretskii
2016-06-10  9:46                               ` David Reitter
2016-06-10 10:22                                 ` Eli Zaretskii
2016-06-10 10:36                                   ` David Reitter
2016-06-13 18:44                                     ` Anders Lindgren
2016-06-13 19:16                                       ` Eli Zaretskii
2016-06-14 12:07                                         ` David Reitter
2016-06-14 17:02                                           ` Eli Zaretskii [this message]
2016-06-15  3:55                                           ` Stefan Monnier
2016-06-14 11:50                                       ` David Reitter

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=83mvmneman.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=alan@idiocy.org \
    --cc=andlind@gmail.com \
    --cc=david.reitter@gmail.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.