GNU bug report logs - #24849
Is Emacs put in idle mode when window is not focused?

Previous Next

Package: emacs;

Reported by: Johan Andersson <johan.andersson <at> burtcorp.com>

Date: Tue, 1 Nov 2016 15:37:02 UTC

Severity: normal

Tags: confirmed

Merged with 22993, 41865

Found in version 25.0.92

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Johan Andersson <johan.andersson <at> burtcorp.com>
Cc: 24849 <at> debbugs.gnu.org
Subject: bug#24849: Is Emacs put in idle mode when window is not focused?
Date: Tue, 01 Nov 2016 18:22:14 +0200
> From: Johan Andersson <johan.andersson <at> burtcorp.com>
> Date: Tue, 1 Nov 2016 09:44:20 +0100
> 
> I have written an Emacs package called Prodigy (https://github.com/rejeep/prodigy.el/). The package is used
> to manage external services from within Emacs. A service is some kind of running process, usually a web
> server or database.
> 
> There has always been an issue that I have not investigated further. It seems that after a while, if Emacs is
> not focused, it ends up in some idle mode. The effect is that requests are very slow, almost hangs for a few
> seconds. If I focus the Emacs window, the request goes through immediately.
> 
> The reason I'm asking about it now is that this has gotten even worse in Emacs 25.
> 
> My question is if anyone knows what this is about and if it's possible to solve?

Please describe in more detail what you package does and how it is
related to "non-idle" Emacs.  IOW, why does your package care whether
Emacs is idle or not.

My suspicion is that your package somehow assumes that the Emacs main
loop is always running at the same fast speed, which is not true.  In
particular, when the frame doesn't have the focus, Emacs 25 stops the
blinking cursor timer, and if that is the only high-frequency activity
in Emacs (i.e. there's no other timers or external events that drive
the event loop), then yes, Emacs will only crank the event loop at
very low frequency.

But I'm not sure this is related to your problem, because I don't know
what does your package expect from Emacs.




This bug report was last modified 3 years and 286 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.