GNU bug report logs -
#76609
31.0.50; The 0.1s repeat timer is very CPU-intensive; it might be a bug?
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
> Look at the code Emacs runs in its idle loop
Could you please guide me where is the idle loop related code in emacs
source repo? which file and which lines ranges.
Thank you.
On Thu, Feb 27, 2025 at 11:07 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Eval Exec <execvy <at> gmail.com>
> > Date: Thu, 27 Feb 2025 22:38:35 +0800
> > Cc: 76609 <at> debbugs.gnu.org
> >
> > Compare to a bash script:
> > while true; do
> > sleep 0.1;
> > date
> > done
> >
> > above script have 0% CPU usage on my laptop.
> >
> > change it to 0.0001:
> > while true; do
> > sleep 0.0001;
> > date
> > done
> >
> > even 0.0001 s repeat, the bash script only have 4% cpu usage.
> >
> > So I think a 0.1s repeat timer in Emacs consume 45% is very surprise.
> > I think maybe we should improve the timer performance
>
> This is not a serious argument, sorry. Look at the code Emacs runs in
> its idle loop, and you will understand how invalid is any comparison
> with a shell script which does little except sleeping for 0.1 sec.
>
[Message part 2 (text/html, inline)]
This bug report was last modified 108 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.