all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: emacs-devel@gnu.org
Subject: Re: master c59e878: Inhibit modification hooks when saving eieio-persistent's
Date: Sat, 02 May 2020 09:26:18 -0400	[thread overview]
Message-ID: <jwvr1w2sd2u.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87tv0z9qt2.fsf@web.de> (Michael Heerdegen's message of "Sat, 02 May 2020 01:30:17 +0200")

>> Do you still see the performance problem if you don't enable
>> `on-screen`?
> There are other similar "culprits" as well, all are private things.
> When I turn them all off, everything is good.

Sounds like performance problems in your "culprits", then.
`before/after-change-functions` are functions that can be called *many*
times within a single command and for this reason they have to be
careful about their performance impact.

E.g. for `on-screen`, AFAICT the after-change-function is only there to
remove the highlighting when you modify the buffer (tho, AFAICT it
doesn't seem to work in my tests, so maybe I misunderstand it).

So IIUC, your after-change-function only need to be installed in those
buffers where there is highlighting to be removed.  IOW, the hook
function should be added to the buffer when you add highlighting to it,
and then removed when you remove the highlighting.  This will also
ensure that it will only be called once per command in any given buffer.

>> Not necessarily: it could be too slow (because of the cost to
>> enter/leave `combine-change-calls`).
> You mean when it's called in iteration?  That makes sense.

Another reason is that we don't know that `object-write` is only called
in temp buffers.


        Stefan




  reply	other threads:[~2020-05-02 13:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200501192115.23847.67499@vcs0.savannah.gnu.org>
     [not found] ` <20200501192116.A55EE20B5B@vcs0.savannah.gnu.org>
2020-05-01 21:01   ` master c59e878: Inhibit modification hooks when saving eieio-persistent's Stefan Monnier
2020-05-01 21:45     ` Michael Heerdegen
2020-05-01 22:03       ` Stefan Monnier
2020-05-01 22:24         ` Michael Heerdegen
2020-05-01 22:40           ` Stefan Monnier
2020-05-01 23:30             ` Michael Heerdegen
2020-05-02 13:26               ` Stefan Monnier [this message]
2020-05-02 21:08                 ` Michael Heerdegen
2020-05-02 22:09                   ` Stefan Monnier
2020-05-03  2:44                     ` Michael Heerdegen
2020-05-03  4:01                       ` Stefan Monnier
2020-05-03  5:13                         ` Michael Heerdegen
2020-05-04 21:09                           ` Eric Abrahamsen
2020-05-04 21:36                             ` Michael Heerdegen
2020-05-04 21:42                               ` Eric Abrahamsen
2020-05-02  4:24             ` Michael Heerdegen
2020-05-02  0:03     ` Eric Abrahamsen
2020-05-02  0:22       ` Michael Heerdegen
2020-05-02 13:32       ` Stefan Monnier
2020-05-02 18:18         ` Eric Abrahamsen

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=jwvr1w2sd2u.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=michael_heerdegen@web.de \
    /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.