* Re: [Emacs-diffs] emacs-26 e5471b2: Add commentary for subtle aspect of frame.el
[not found] ` <20180601123547.725252040B@vcs0.savannah.gnu.org>
@ 2018-06-01 20:30 ` Stefan Monnier
0 siblings, 0 replies; only message in thread
From: Stefan Monnier @ 2018-06-01 20:30 UTC (permalink / raw)
To: emacs-devel; +Cc: Eli Zaretskii
> --- a/lisp/frame.el
> +++ b/lisp/frame.el
> @@ -2475,6 +2475,9 @@ See also `toggle-frame-maximized'."
> ;; F5 then produces the correct effect, the variable doesn't need
> ;; to be in this list; otherwise, it does.
> (mapc (lambda (var)
> + ;; Using symbol-function here tells the watcher machinery to
> + ;; call the C function set-buffer-redisplay directly, thus
> + ;; avoiding a potential GC.
> (add-variable-watcher var (symbol-function 'set-buffer-redisplay)))
> '(line-spacing
> overline-margin
I don't understand why triggering a GC when setting or let-binding those
vars is something we worry about.
Clearly, it's not a matter of correctness/safety: anyone can add GC-ing
watchers to those vars and hence cause potential GCs at those points.
But in terms of performance I don't see any significant difference
either (if the GC doesn't happen there, it will happen right after that
anyway).
I don't actually have an objection to using (symbol-function
'set-buffer-redisplay), but I can't see any particular reason to do so,
and the above comment doesn't clarify it either for me.
What am I missing?
Stefan
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-06-01 20:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180601123545.20823.3653@vcs0.savannah.gnu.org>
[not found] ` <20180601123547.725252040B@vcs0.savannah.gnu.org>
2018-06-01 20:30 ` [Emacs-diffs] emacs-26 e5471b2: Add commentary for subtle aspect of frame.el Stefan Monnier
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).