emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: high cpu load with image loading


From: Dirk-Jan C . Binnema
Subject: Re: high cpu load with image loading
Date: Wed, 01 Sep 2010 21:59:59 +0300
User-agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/24.0 Mule/6.0 (HANACHIRUSATO)

Hi,

>>>>> On Wed, 1 Sep 2010 10:35:30 +0200,   ("JV") wrote:

  > "Dirk-Jan C. Binnema" <address@hidden> writes:
  
  >> (put-image (create-image "pic.jpg") 0) ;; some normal 1024x768 jpeg image
  >> 
  >> I only get a little square, and emacs consumes ca. 60% cpu, with X taking a
  >> lot of the rest -- this continues for at least a minute or so. I checked 
with
  >> oprofile, I get the following profile (see below). So what is this
  >> assq_no_quit doing?

  JV> Could you possibly do a m-x report-emacs-bug ?
  JV> It would be nice to see your configure options etc.
  JV> Also provide a link to your image.

This is interesting: I now found that it's fully reproducible with 'emacs -Q'
(from trunk) if the image does _not_exist_ -- I found that because the image
had a typo in it's name, and this is apparently what I saw yesterday. 

Find below the stuff that report-emacs-bug gathered. The only non-standard
thing is this --with-imagemagick, which I tried recently; but I don't think
emacs is using that for loading images. Interestingly, this is what I see:

#("x" 0 1 (display (image :type jpeg :file 
"~/pic.jpg02353_sunriseclouds_1024x768.jpg")))Cannot find image file 
`~/pic.jpg02353_sunriseclouds_1024x768.jpg'
Cannot find image file `~/pic.jpg02353_sunriseclouds_1024x768.jpg' [1496 times]
Making completion list...
Cannot find image file `~/pic.jpg02353_sunriseclouds_1024x768.jpg' [1346 times]

Interestingly, look at the [1496 times]. We go into some loop?

Of course I now tried with an image that *does* exist,
   http://interfacelift.com/wallpaper_beta/grab/02353_sunriseclouds_1024x768.jpg
but that gives me:

#("x" 0 1 (display (image :type jpeg :file 
"~/02353_sunriseclouds_1024x768.jpg")))Error reading JPEG image `(image :type 
jpeg :file ~/02353_sunriseclouds_1024x768.jpg)': JPEG parameter struct 
mismatch: library thinks size is 464, caller expects 468
   
------------------------------------------------------------

In GNU Emacs 24.0.50.9 (i686-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2010-09-01 on cthulhu
Windowing system distributor `The X.Org Foundation', version 11.0.10706000
configured using `configure  '--with-imagemagick''

Important settings:
  value of $LC_ALL: en_DK.UTF-8
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: en_DK.UTF8
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: en_DK.UTF8
  value of $LANG: en_DK.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  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
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-y <left> <down-mouse-1> <mouse-movement> <mouse-1> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> C-SPC <C-right> <right> 
<right> <right> <right> <right> <right> <right> <left> 
<left> <left> C-y <up> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> ~ / <down> C-x C-e <help-echo> <help-echo> 
<down-mouse-1> <mouse-movement> <mouse-1> M-x r e o 
<backspace> p o <tab> t <backspace> r <tab> <retur
n>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set [3 times]
byte-code: End of buffer
#("x" 0 1 (display (image :type jpeg :file 
"~/pic.jpg02353_sunriseclouds_1024x768.jpg")))Cannot find image file 
`~/pic.jpg02353_sunriseclouds_1024x768.jpg'
Cannot find image file `~/pic.jpg02353_sunriseclouds_1024x768.jpg' [1496 times]
Making completion list...
Cannot find image file `~/pic.jpg02353_sunriseclouds_1024x768.jpg' [1346 times]

Load-path shadows: /usr/local/share/emacs/site-lisp/ob hides

[ .... snip: shadows for WL and org-mode ... ]

Features:
(shadow sort gnus-util mail-extr message sendmail regexp-opt rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader
emacsbug help-mode easymenu view tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mldrag 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 loaddefs button minibuffer faces cus-face files text-properties
overlay md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)


  >> 
  >> CPU: Core 2, speed 1601 MHz (estimated)
  >> Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit 
mask of 0x00 (Unhalted core cycles) count 100000
  >> samples  %        symbol name
  >> 135329   50.5676  assq_no_quit
  >> 25840     9.6555  mark_object
  >> 6252      2.3361  Fgarbage_collect
  >> 5389      2.0137  re_match_2_internal
  >> 4981      1.8612  Fbyte_code
  >> 3240      1.2107  oblookup
  >> 2623      0.9801  Fstring_equal
  >> 2038      0.7615  Fplist_get
  >> 1875      0.7006  lookup_char_property
  >> 1835      0.6857  readchar
  >> 1833      0.6849  hash_string_case_insensitive
  >> 1810      0.6763  re_search_2
  >> 1370      0.5119  mark_char_table
  >> 1359      0.5078  Fall_completions
  >> 1318      0.4925  append_glyph
  >> 1310      0.4895  read1
  >> 1305      0.4876  Ffuncall
  >> 1272      0.4753  mark_vectorlike
  >> 1190      0.4447  internal_equal
  >> 1143      0.4271  x_produce_glyphs
  >> 1065      0.3980  merge_face_vectors
  >> 1062      0.3968  casify_object
  >> 1048      0.3916  sxhash
  >> 1044      0.3901  Fcompare_strings
  >> 1001      0.3740  display_mode_element
  >> 972       0.3632  set_buffer_internal_1
  >> 958       0.3580  Fassq
  >> 899       0.3359  find_interval
  >> 894       0.3341  validate_interval_range
  >> 882       0.3296  readbyte_from_file
  >> 770       0.2877  specbind
  >> [...]

  JV> -- 
  JV> Joakim Verona




reply via email to

[Prev in Thread] Current Thread [Next in Thread]