Subject: bug#19776: 25.0.50; HTML rendering is very slow

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 25 Oct 2021 16:48:17 +0200

Lars Ingebrigtsen <[email-masked]> writes:

> No EMACS_IGNORE_TIMERFD
> No EMACSDATA
> No EMACS_FONT_LOG
> No HANGUL_KEYBOARD_TYPE
>
> So that's four more bugs, I guess.

No, just one.  I interpreted the output wrong -- the only thing that's
getenv'd before the environment is EMACS_IGNORE_TIMERFD.

So this patch will fix that:

diff --git a/src/emacs.c b/src/emacs.c
index a24543a586..032b27fcf3 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1872,7 +1872,6 @@ main (int argc, char **argv)
   init_bignum ();
   init_threads ();
   init_eval ();
-  init_atimer ();
   running_asynch_code = 0;
   init_random ();
 
@@ -2034,6 +2033,9 @@ main (int argc, char **argv)
   if (!will_dump_p ())
     set_initial_environment ();
 
+  /* Has to run after the environment is set up. */
+  init_atimer ();
+
 #ifdef WINDOWSNT
   globals_of_w32 ();
 #ifdef HAVE_W32NOTIFY

I think it's probably safe to push to Emacs 28, but since nobody has
complained about it since 2014 (when this was introduced), I'm pushing
it to master instead.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no