GNU bug report logs -
#5642
Reporting a bug loads many Gnus libraries
Previous Next
Reported by: Glenn Morris <rgm <at> gnu.org>
Date: Wed, 24 Feb 2010 18:32:01 UTC
Severity: normal
Done: Glenn Morris <rgm <at> gnu.org>
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 5642 in the body.
You can then email your comments to 5642 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5642
; Package
emacs
.
(Wed, 24 Feb 2010 18:32:01 GMT)
Full text and
rfc822 format available.
Message #3 received at submit <at> debbugs.gnu.org (full text, mbox):
Current trunk on GNU/Linux:
emacs -Q
M-x report-emacs-bug
Typing C-c C-c to send the bug loads 22 extra libraries, including
several Gnus ones:
gnus-msg gnus-art mm-uu mml2015 epg-config mm-view smime dig gnus-sum
nnoo gnus-group gnus-undo nnmail mail-source format-spec gnus-start
gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems
This extra complexity leads to unexpected bugs like #5299.
In contrast, with mail-user-agent = sendmail-user-agent, sending a
report loads exactly 1 extra library (mail-utils).
After sending a bug report with message-user-agent, there are 146
libraries loaded. With sendmail-user-agent, the number is 93.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5642
; Package
emacs
.
(Wed, 24 Feb 2010 21:33:02 GMT)
Full text and
rfc822 format available.
Message #6 received at 5642 <at> debbugs.gnu.org (full text, mbox):
> Current trunk on GNU/Linux:
> emacs -Q
> M-x report-emacs-bug
> Typing C-c C-c to send the bug loads 22 extra libraries, including
> several Gnus ones:
> gnus-msg gnus-art mm-uu mml2015 epg-config mm-view smime dig gnus-sum
> nnoo gnus-group gnus-undo nnmail mail-source format-spec gnus-start
> gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems
I'm not worried about loading more libraries: the change is specifically
to provide more features so extra code is to be expected. It'd be good
to try and reduce the reliance on Gnus libraries there, tho, or to
rename/restructure them to make it more clear that they're actually
useful independently from the Gnus MUA.
> This extra complexity leads to unexpected bugs like #5299.
Actually, I see no evidence that #5299 is linked to any of
that complexity.
Stefan
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5642
; Package
emacs
.
(Thu, 25 Feb 2010 18:26:02 GMT)
Full text and
rfc822 format available.
Message #9 received at 5642 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier wrote:
> I'm not worried about loading more libraries: the change is specifically
> to provide more features so extra code is to be expected.
For fun, I estimated the difference as ~ 75000 extra lines. This is 3
times the size of the entire lisp/mail directory, and about 50% of the
size of the combined mail+gnus directories.
I think that, just maybe, some of those extra libraries aren't really
necessary to send my bug report.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5642
; Package
emacs
.
(Thu, 25 Feb 2010 19:30:04 GMT)
Full text and
rfc822 format available.
Message #12 received at 5642 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Date: Wed, 24 Feb 2010 16:32:00 -0500
> Cc: 5642 <at> debbugs.gnu.org
>
> > Typing C-c C-c to send the bug loads 22 extra libraries, including
> > several Gnus ones:
>
> > gnus-msg gnus-art mm-uu mml2015 epg-config mm-view smime dig gnus-sum
> > nnoo gnus-group gnus-undo nnmail mail-source format-spec gnus-start
> > gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems
>
> I'm not worried about loading more libraries: the change is specifically
> to provide more features so extra code is to be expected.
Why isn't each library loaded only when the respective feature(s)
is/are needed?
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5642
; Package
emacs
.
(Thu, 25 Feb 2010 19:46:02 GMT)
Full text and
rfc822 format available.
Message #15 received at 5642 <at> debbugs.gnu.org (full text, mbox):
Glenn Morris wrote:
> Typing C-c C-c to send the bug loads 22 extra libraries, including
> several Gnus ones:
AFAICS, this is all due to the call to gnus-setup-posting-charset in
message-send-mail.
AFAICS, when the message being sent is a mail message (rather than a
news one), this function just returns (nil).
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5642
; Package
emacs
.
(Thu, 25 Feb 2010 21:13:02 GMT)
Full text and
rfc822 format available.
Message #18 received at 5642 <at> debbugs.gnu.org (full text, mbox):
Glenn Morris wrote:
> AFAICS, this is all due to the call to gnus-setup-posting-charset in
> message-send-mail.
Here are two alternative solutions to this.
(Fun-fact: requiring gnus-msg loads 59 libraries.)
Solution 1: (note, gnus-s-p-c is only used in message and mml)
*** lisp/gnus/mml.el 2010-01-13 08:35:10 +0000
--- lisp/gnus/mml.el 2010-02-25 20:59:43 +0000
***************
*** 35,41 ****
(eval-when-compile (require 'cl))
(autoload 'message-make-message-id "message")
! (autoload 'gnus-setup-posting-charset "gnus-msg")
(autoload 'gnus-make-local-hook "gnus-util")
(autoload 'message-fetch-field "message")
(autoload 'message-mark-active-p "message")
--- 35,41 ----
(eval-when-compile (require 'cl))
(autoload 'message-make-message-id "message")
! (declare-function gnus-setup-posting-charset "gnus-msg" (group))
(autoload 'gnus-make-local-hook "gnus-util")
(autoload 'message-fetch-field "message")
(autoload 'message-mark-active-p "message")
***************
*** 1445,1450 ****
--- 1445,1451 ----
(setq mml-preview-buffer (generate-new-buffer
(concat (if raw "*Raw MIME preview of "
"*MIME preview of ") (buffer-name))))
+ (require 'gnus-msg) ; for gnus-setup-posting-charset
(save-excursion
(let* ((buf (current-buffer))
(message-options message-options)
Solution 2:
*** lisp/gnus/message.el 2010-02-24 03:12:54 +0000
--- lisp/gnus/message.el 2010-02-25 20:55:53 +0000
***************
*** 4417,4423 ****
(mailbuf (current-buffer))
(message-this-is-mail t)
(message-posting-charset
! (if (fboundp 'gnus-setup-posting-charset)
(gnus-setup-posting-charset nil)
message-posting-charset))
(headers message-required-mail-headers))
--- 4422,4429 ----
(mailbuf (current-buffer))
(message-this-is-mail t)
(message-posting-charset
! (if (and (fboundp 'gnus-setup-posting-charset)
! (boundp 'gnus-group-posting-charset-alist))
(gnus-setup-posting-charset nil)
message-posting-charset))
(headers message-required-mail-headers))
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5642
; Package
emacs
.
(Fri, 26 Feb 2010 04:48:02 GMT)
Full text and
rfc822 format available.
Message #21 received at 5642 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii wrote:
> Why isn't each library loaded only when the respective feature(s)
> is/are needed?
With a bit of playing around in this way, I managed to avoid 30
libraries being loaded. I'll install these changes after 23.2.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5642
; Package
emacs
.
(Fri, 26 Feb 2010 05:25:01 GMT)
Full text and
rfc822 format available.
Message #24 received at 5642 <at> debbugs.gnu.org (full text, mbox):
>> Why isn't each library loaded only when the respective feature(s)
>> is/are needed?
> With a bit of playing around in this way, I managed to avoid 30
> libraries being loaded. I'll install these changes after 23.2.
Thank you,
Stefan
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5642
; Package
emacs
.
(Fri, 26 Feb 2010 06:02:02 GMT)
Full text and
rfc822 format available.
Message #27 received at 5642 <at> debbugs.gnu.org (full text, mbox):
Typing C-c C-c to send the bug loads 22 extra libraries, including
several Gnus ones:
gnus-msg gnus-art mm-uu mml2015 epg-config mm-view smime dig gnus-sum
nnoo gnus-group gnus-undo nnmail mail-source format-spec gnus-start
gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems
This is one of the bad things about message mode
which should have been fixed before considering making it the default.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#5642
; Package
emacs
.
(Sat, 27 Feb 2010 02:33:01 GMT)
Full text and
rfc822 format available.
Message #30 received at 5642 <at> debbugs.gnu.org (full text, mbox):
With a bit of playing around in this way, I managed to avoid 30
libraries being loaded. I'll install these changes after 23.2.
I think you should install them now, because they are a bug fix.
bug closed, send any further explanations to Glenn Morris <rgm <at> gnu.org>
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 19 Mar 2010 03:00:03 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
.
(Fri, 16 Apr 2010 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 15 years and 123 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.