From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Philip Kaludercic <philipk@posteo.net>
Cc: emacs-devel@gnu.org
Subject: Re: master 43237f3d27: ; * rcirc.el (rcirc-print): Prefer sleep-for over sit-for
Date: Sat, 19 Feb 2022 15:01:21 -0500 [thread overview]
Message-ID: <jwviltatyoo.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20220219193512.0F87BC00894@vcs2.savannah.gnu.org> (Philip Kaludercic's message of "Sat, 19 Feb 2022 14:35:11 -0500 (EST)")
Philip Kaludercic [2022-02-19 14:35:11] wrote:
> branch: master
> commit 43237f3d27897e2a0c6de745770802d0ba40e3a5
> Author: Philip Kaludercic <philipk@posteo.net>
> Commit: Philip Kaludercic <philipk@posteo.net>
>
> ; * rcirc.el (rcirc-print): Prefer sleep-for over sit-for
>
> Compare
>
> (benchmark-run 100000 (sit-for 0))
> ;; => (2.600030102 12 1.523461324000003)
>
> with
>
> (benchmark-run 100000 (sleep-for 0))
> ;; (0.015882939 0 0.0)
I think that's because `sleep-for` doesn't redisplay whereas `sit-for`
(usually) does.
> - (sit-for 0) ; displayed text before hook
> + (sleep-for 0) ; displayed text before hook
What is this for? The comment suggests it might be because you want to
force a redisplay, but if `sleep-for` does the trick apparently that's not it.
Stefan
next parent reply other threads:[~2022-02-19 20:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <164529931177.1767.11895834409261548078@vcs2.savannah.gnu.org>
[not found] ` <20220219193512.0F87BC00894@vcs2.savannah.gnu.org>
2022-02-19 20:01 ` Stefan Monnier [this message]
2022-02-19 21:04 ` master 43237f3d27: ; * rcirc.el (rcirc-print): Prefer sleep-for over sit-for Philip Kaludercic
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=jwviltatyoo.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=philipk@posteo.net \
/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).