GNU bug report logs - #18607
24.3.93; Warn user if finding fqdn is too slow

Previous Next

Package: emacs;

Reported by: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>

Date: Thu, 2 Oct 2014 13:11:01 UTC

Severity: wishlist

Merged with 18142

Found in version 24.3.93

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18607 in the body.
You can then email your comments to 18607 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#18607; Package emacs. (Thu, 02 Oct 2014 13:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Richard <theonewiththeevillook <at> yahoo.fr>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 02 Oct 2014 13:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.93; Warn user if finding fqdn is too slow
Date: Thu, 02 Oct 2014 15:08:28 +0200
Severity: wishlist

Context :

Sometimes we encounter the known problem "Emacs startup on GNU/Linux
systems [...] is slow." (see e.g. #1492, #9291) and the only visible
effect is that emacs is slow.

The fact that emacs being slow at startup is sometimes considered normal
means that the above problem might be overlooked. (That's exactly what
happened to me the last few weeks, I'm happily generalizing this to
everyone.)

Hence I suggest to warn the user about the situation.

As I know absolutely nothing about C, I googled and came up with the,
possibly horrid, patch below.

diff --git a/src/ChangeLog b/src/ChangeLog
index 00a10f2..20b4e72 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2014-10-02  Nicolas Richard  <theonewiththeevillook <at> yahoo.fr>
+
+	* sysdep.c (init_system_name): Warn if the function takes too much
+	time.
+
 2014-10-01  Jan Djärv  <jan.h.d <at> swipnet.se>
 
 	* xfaces.c (Finternal_set_lisp_face_attribute): Don't try to
diff --git a/src/sysdep.c b/src/sysdep.c
index 3870b8d..5495370 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -1341,6 +1341,9 @@ extern int h_errno;
 void
 init_system_name (void)
 {
+  time_t start, end;
+  double dif;
+  time (&start);
 #ifndef HAVE_GETHOSTNAME
   struct utsname uts;
   uname (&uts);
@@ -1471,6 +1474,11 @@ init_system_name (void)
       if (*p == ' ' || *p == '\t')
 	*p = '-';
   }
+  time (&end);
+  dif = difftime (end, start);
+  if (dif > 4) {
+    fprintf (stderr, "It was very long to init system name. See etc/PROBLEMS via C-h C-p\n");
+  }
 }
 
 sigset_t empty_mask;

-- 
Nicolas Richard




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18607; Package emacs. (Thu, 07 Jun 2018 00:08:01 GMT) Full text and rfc822 format available.

Message #8 received at 18607 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Nicolas Richard <theonewiththeevillook <at> yahoo.fr>
Cc: 18607 <at> debbugs.gnu.org
Subject: Re: bug#18607: 24.3.93; Warn user if finding fqdn is too slow
Date: Wed, 06 Jun 2018 20:06:58 -0400
forcemerge 18607 18142
close 18607
quit

Nicolas Richard <theonewiththeevillook <at> yahoo.fr> writes:

> Sometimes we encounter the known problem "Emacs startup on GNU/Linux
> systems [...] is slow." (see e.g. #1492, #9291) and the only visible
> effect is that emacs is slow.
>
> The fact that emacs being slow at startup is sometimes considered normal
> means that the above problem might be overlooked. (That's exactly what
> happened to me the last few weeks, I'm happily generalizing this to
> everyone.)

Since Emacs no longer performs DNS on startup to find fqdn, I think this
is no longer needed.




Forcibly Merged 18142 18607. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 07 Jun 2018 00:08:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 18607 <at> debbugs.gnu.org and Nicolas Richard <theonewiththeevillook <at> yahoo.fr> Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 07 Jun 2018 00:08:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 05 Jul 2018 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 37 days ago.

Previous Next


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