GNU bug report logs -
#14423
24.3; Gnus gratuitously loads image libraries in w32 text-mode Emacs
Previous Next
Reported by: Eli Zaretskii <eliz <at> gnu.org>
Date: Sun, 19 May 2013 19:50:02 UTC
Severity: minor
Found in version 24.3
Fixed in version 24.4
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 14423 in the body.
You can then email your comments to 14423 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#14423
; Package
emacs
.
(Sun, 19 May 2013 19:50:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 19 May 2013 19:50:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Many Gnus features use the function gnus-image-type-available-p, which
does this:
(defun gnus-image-type-available-p (type)
(and (fboundp 'image-type-available-p)
(image-type-available-p type)
(if (fboundp 'display-images-p)
(display-images-p)
t)))
Because this calls image-type-available-p before testing the display
for image support (by calling display-images-p), a text-mode session
on MS-Windows will load image libraries that cannot be possibly useful
in a non-GUI session. (The MS-Windows build of Emacs loads image DLL
shared libraries on demand, and that happens inside the call to
image-type-available-p.) This useless library load both slows down
loading certain Gnus packages, and unnecessarily bloats the memory
footprint of the Emacs process.
To avoid this adverse effect, gnus-image-type-available-p should test
the result of calling display-images-p _before_ it checks whether the
specific image type can be supported.
Thanks.
In GNU Emacs 24.3.1 (i386-mingw-nt5.1.2600)
of 2013-03-11 on HOME-C4E4A596F7
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
`configure --with-gcc (3.4) --cflags -Id:/usr/include/libxml2'
Important settings:
value of $LANG: ENU
locale-coding-system: cp1255
default enable-multibyte-characters: t
Major mode: Mail
Minor modes in effect:
shell-dirtrack-mode: t
diff-auto-refine-mode: t
flyspell-mode: t
desktop-save-mode: t
show-paren-mode: t
display-time-mode: t
tooltip-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
temp-buffer-resize-mode: t
line-number-mode: t
auto-fill-function: mail-mode-auto-fill
abbrev-mode: t
Recent input:
SPC <backspace> <backspace> y SPC u s e r s SPC o f
SPC i t SPC h e r e . M-q <up> <C-right> <C-right>
<C-right> <C-right> <C-right> SPC o n SPC W i n d o
w s M-q <down> SPC SPC W h y SPC h a v e SPC a SPC
p a r t i a l SPC s o l u t i o n SPC w h e n SPC y
o u SPC c a n SPC h a v e SPC a SPC c o m p l e t e
SPC o n e ? <down> <return> <C-home> <down> <down>
<C-right> <C-right> <C-right> <C-right> <M-left> <C-end>
C-c C-s <switch-frame> d p p <M-home> <C-end> <M-end>
<switch-frame> <help-echo> <help-echo> <help-echo>
<switch-frame> M-1 g <up> <up> <return> SPC o <return>
C-x C-s <switch-frame> <help-echo> <help-echo> <help-echo>
<switch-frame> <help-echo> <switch-frame> <switch-frame>
M-1 g <up> <up> <return> d d r <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <down>
<C-right> <C-right> <C-right> <C-right> <C-right> <C-left>
<M-backspace> <M-backspace> <M-backspace> <C-end> C-c
C-y C-x C-x C-SPC <down> <down> C-w <down> <down> <down>
<down> C-SPC <next> <down> C-w <down> <down> <down>
<down> <down> <C-right> <C-right> <C-right> <C-right>
<C-right> <down> <C-left> <C-left> <left> <left> <left>
<left> <left> <left> <C-end> C-w <return> <return>
I t SPC s h o u l d SPC b e SPC p o s s i b l e , SPC
b u t SPC I S-SPC s h o u l d SPC t r y . <return>
<C-home> C-c C-s <switch-frame> <help-echo> <switch-frame>
<help-echo> <help-echo> <help-echo> <switch-frame>
C-x C-s <help-echo> <help-echo> <switch-frame> <help-echo>
<switch-frame> M-1 g <up> <return> d d C-x C-s <switch-frame>
<switch-frame> <switch-frame> M-x r e p o r t - e m
<tab> <return>
Recent messages:
Wrote d:/usr/eli/rmail/INBOX [2 times]
Getting mail from d:/usr/eli/data/mail.new...
Counting new messages...done (2)
Saving file d:/usr/eli/rmail/INBOX...
Wrote d:/usr/eli/rmail/INBOX [2 times]
Computing summary lines...done
2 new messages read
No following nondeleted message
Saving file d:/usr/eli/rmail/INBOX...
Wrote d:/usr/eli/rmail/INBOX [2 times]
Load-path shadows:
None found.
Features:
(shadow emacsbug shell pp descr-text mule-util ebuff-menu electric
bug-reference misearch multi-isearch add-log network-stream starttls
tls mail-extr smtpmail auth-source eieio password-cache dabbrev
mailalias sendmail rmailout help-mode autoconf autoconf-mode perl-mode
vc-git tcl conf-mode generic arc-mode archive-mode diff-mode dired-x
cl-macs gv dired vc-cvs sh-script smie executable face-remap org-wl
org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs
org-html org-exp ob-exp org-exp-blocks org-agenda org-info org-gnus
gnus-util org-docview org-bibtex bibtex org-bbdb org byte-opt warnings
bytecomp byte-compile cconv advice help-fns advice-preload ob-tangle
ob-ref ob-lob ob-table org-footnote org-src ob-comint ob-keys
org-pcomplete pcomplete comint ansi-color ring org-list org-faces
org-entities org-version ob-emacs-lisp ob org-compat org-macs ob-eval
org-loaddefs find-func cal-menu calendar cal-loaddefs noutline outline
easy-mmode jka-compr cc-awk make-mode autorevert flyspell info vc-bzr
cc-langs cl cl-lib cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs qp rmailsum rmailmm
message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode
mailabbrev gmm-utils mailheader mail-parse rfc2231 rmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils desktop server
filecache mairix cus-edit easymenu cus-start cus-load wid-edit
saveplace midnight ispell generic-x paren battery time time-date
tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp
w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset image
regexp-opt fringe tabulated-list newcomment lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process w32 multi-tty
emacs)
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#14423
; Package
emacs,gnus
.
(Wed, 05 Jun 2013 15:21:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 14423 <at> debbugs.gnu.org (full text, mbox):
On Sun, 19 May 2013 22:46:44 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:
EZ> Many Gnus features use the function gnus-image-type-available-p, which
EZ> does this:
EZ> (defun gnus-image-type-available-p (type)
EZ> (and (fboundp 'image-type-available-p)
EZ> (image-type-available-p type)
EZ> (if (fboundp 'display-images-p)
EZ> (display-images-p)
EZ> t)))
EZ> Because this calls image-type-available-p before testing the display
EZ> for image support (by calling display-images-p), a text-mode session
EZ> on MS-Windows will load image libraries that cannot be possibly useful
EZ> in a non-GUI session. (The MS-Windows build of Emacs loads image DLL
EZ> shared libraries on demand, and that happens inside the call to
EZ> image-type-available-p.) This useless library load both slows down
EZ> loading certain Gnus packages, and unnecessarily bloats the memory
EZ> footprint of the Emacs process.
EZ> To avoid this adverse effect, gnus-image-type-available-p should test
EZ> the result of calling display-images-p _before_ it checks whether the
EZ> specific image type can be supported.
That seems like a very trivial fix. Does the patch below do it? Or
should I make this check the very first thing?
Thanks
Ted
diff --git a/lisp/gnus-ems.el b/lisp/gnus-ems.el
index 4d9b579..f9ef70f 100644
--- a/lisp/gnus-ems.el
+++ b/lisp/gnus-ems.el
@@ -165,10 +165,10 @@
(defun gnus-image-type-available-p (type)
(and (fboundp 'image-type-available-p)
- (image-type-available-p type)
(if (fboundp 'display-images-p)
(display-images-p)
- t)))
+ t)
+ (image-type-available-p type)))
(defun gnus-create-image (file &optional type data-p &rest props)
(let ((face (plist-get props :face)))
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#14423
; Package
emacs,gnus
.
(Thu, 06 Jun 2013 15:38:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 14423 <at> debbugs.gnu.org (full text, mbox):
> From: Ted Zlatanov <tzz <at> lifelogs.com>
> Cc: 14423 <at> debbugs.gnu.org
> Gmane-Reply-To-List: yes
> Date: Wed, 05 Jun 2013 11:18:21 -0400
>
> That seems like a very trivial fix. Does the patch below do it?
Yes.
> Or should I make this check the very first thing?
No need. Just testing whether the function exists doesn't load any
libraries, only the call to the function does.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org
:
bug#14423
; Package
emacs,gnus
.
(Thu, 06 Jun 2013 16:35:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 14423 <at> debbugs.gnu.org (full text, mbox):
On Thu, 06 Jun 2013 18:35:27 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:
>> From: Ted Zlatanov <tzz <at> lifelogs.com>
>> Cc: 14423 <at> debbugs.gnu.org
>> Gmane-Reply-To-List: yes
>> Date: Wed, 05 Jun 2013 11:18:21 -0400
>>
>> That seems like a very trivial fix. Does the patch below do it?
EZ> Yes.
>> Or should I make this check the very first thing?
EZ> No need. Just testing whether the function exists doesn't load any
EZ> libraries, only the call to the function does.
EZ> Thanks.
OK; pushed. Thanks for the suggestion. If your tests pass it we can
close the bug... should be trivial :)
Ted
bug marked as fixed in version 24.4, send any further explanations to
14423 <at> debbugs.gnu.org and Eli Zaretskii <eliz <at> gnu.org>
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sat, 08 Jun 2013 00:59: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
.
(Sat, 06 Jul 2013 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 42 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.