[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 43237f3d27: ; * rcirc.el (rcirc-print): Prefer sleep-for over
From: |
Stefan Monnier |
Subject: |
Re: master 43237f3d27: ; * rcirc.el (rcirc-print): Prefer sleep-for over sit-for |
Date: |
Sat, 19 Feb 2022 15:01:21 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
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
- Re: master 43237f3d27: ; * rcirc.el (rcirc-print): Prefer sleep-for over sit-for,
Stefan Monnier <=