* bug#5642: Reporting a bug loads many Gnus libraries
@ 2010-02-24 18:31 Glenn Morris
2010-02-24 21:32 ` Stefan Monnier
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Glenn Morris @ 2010-02-24 18:31 UTC (permalink / raw
To: 5642
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#5642: Reporting a bug loads many Gnus libraries
2010-02-24 18:31 bug#5642: Reporting a bug loads many Gnus libraries Glenn Morris
@ 2010-02-24 21:32 ` Stefan Monnier
2010-02-25 18:24 ` Glenn Morris
2010-02-25 19:28 ` Eli Zaretskii
2010-02-25 19:45 ` Glenn Morris
2010-02-26 6:01 ` Richard Stallman
2 siblings, 2 replies; 10+ messages in thread
From: Stefan Monnier @ 2010-02-24 21:32 UTC (permalink / raw
To: Glenn Morris; +Cc: 5642
> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#5642: Reporting a bug loads many Gnus libraries
2010-02-24 21:32 ` Stefan Monnier
@ 2010-02-25 18:24 ` Glenn Morris
2010-02-25 19:28 ` Eli Zaretskii
1 sibling, 0 replies; 10+ messages in thread
From: Glenn Morris @ 2010-02-25 18:24 UTC (permalink / raw
To: Stefan Monnier; +Cc: 5642
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#5642: Reporting a bug loads many Gnus libraries
2010-02-24 21:32 ` Stefan Monnier
2010-02-25 18:24 ` Glenn Morris
@ 2010-02-25 19:28 ` Eli Zaretskii
2010-02-26 4:47 ` Glenn Morris
1 sibling, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2010-02-25 19:28 UTC (permalink / raw
To: Stefan Monnier; +Cc: 5642
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Wed, 24 Feb 2010 16:32:00 -0500
> Cc: 5642@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?
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#5642: Reporting a bug loads many Gnus libraries
2010-02-24 18:31 bug#5642: Reporting a bug loads many Gnus libraries Glenn Morris
2010-02-24 21:32 ` Stefan Monnier
@ 2010-02-25 19:45 ` Glenn Morris
2010-02-25 21:12 ` Glenn Morris
2010-02-26 6:01 ` Richard Stallman
2 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2010-02-25 19:45 UTC (permalink / raw
To: 5642
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).
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#5642: Reporting a bug loads many Gnus libraries
2010-02-25 19:45 ` Glenn Morris
@ 2010-02-25 21:12 ` Glenn Morris
0 siblings, 0 replies; 10+ messages in thread
From: Glenn Morris @ 2010-02-25 21:12 UTC (permalink / raw
To: 5642
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))
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#5642: Reporting a bug loads many Gnus libraries
2010-02-24 18:31 bug#5642: Reporting a bug loads many Gnus libraries Glenn Morris
2010-02-24 21:32 ` Stefan Monnier
2010-02-25 19:45 ` Glenn Morris
@ 2010-02-26 6:01 ` Richard Stallman
2 siblings, 0 replies; 10+ messages in thread
From: Richard Stallman @ 2010-02-26 6:01 UTC (permalink / raw
To: Glenn Morris; +Cc: 5642
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.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-02-27 2:32 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-24 18:31 bug#5642: Reporting a bug loads many Gnus libraries Glenn Morris
2010-02-24 21:32 ` Stefan Monnier
2010-02-25 18:24 ` Glenn Morris
2010-02-25 19:28 ` Eli Zaretskii
2010-02-26 4:47 ` Glenn Morris
2010-02-26 5:24 ` Stefan Monnier
2010-02-27 2:32 ` Richard Stallman
2010-02-25 19:45 ` Glenn Morris
2010-02-25 21:12 ` Glenn Morris
2010-02-26 6:01 ` Richard Stallman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.