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

w3m tab line constantly consumes CPU



This bug report will be sent to the emacs-w3m development team,
 not to your local site managers!!
Please write in simple English, because the emacs-w3m developers
aren't good at English reading. ;-)

Please describe as succinctly as possible:
	- What happened.
	- What you thought should have happened.
	- Precisely what you were doing at the time.

Please also include any Lisp back-traces that you may have.
================================================================
Dear Bug Team!

From time to time, I see Emacs constantly consuming CPU, ca. 10%.  Emacs
doesn't hang, but consumes enough CPU to let my ventilator run all the
time.

It took some time to identify that w3m was the culprit, its tab line,
to be more precise.  When the tab line is visible, `w3m-tab-line' and
`w3m-force-window-update' are constantly run, ca. 10 times per second.
Use `debug-on-entry' to verify.

Why does that happen?  Actually, it is a loop.  The w3m header line has
this format:

  (:eval (w3m-tab-line))

And this is what I think loops:

1. The w3m header-line (the tab line) is redisplayed.
2. `w3m-tab-line' is called.  The code contains

  (run-at-time 0.1 nil
		     (lambda (buffer)
		       (when (buffer-live-p buffer)
			 (with-current-buffer buffer
			   (setq w3m-tab-timer nil)
			   (inline (w3m-force-window-update)))))
		     current)

  so

3. So, after 0.1 seconds, `w3m-force-window-update' is called.  This redraws
   the window's header line, too, so we are back to 1.  Ouch!

I don't want to make a suggestion on how to fix this because I don't
know the code well.  We have to avoid the loop somehow.


Thanks,

Michael.

================================================================

System Info to help track down your bug:
---------------------------------------
emacs-w3m-version
 => "1.4.523"
emacs-version
 => "GNU Emacs 24.3.50.7 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.4)\n of 2013-10-01 on drachen"
mule-version
 => "6.0 (HANACHIRUSATO)"
system-type
 => gnu/linux
(featurep 'gtk)
 => t
w3m-version
 => "w3m/0.5.3+debian-11"
w3m-type
 => w3m-m17n
w3m-compile-options
 => ("lang=en" "m17n" "image" "color" "ansi-color" "mouse" "gpm" "menu" "cookie" "ssl" "ssl-verify" "external-uri-loader" "w3mmailer" "nntp" "gopher" "ipv6" "alarm" "mark" "migemo")
w3m-language
 => nil
w3m-command-arguments
 => nil
w3m-command-arguments-alist
 => nil
w3m-command-environment
 => nil
w3m-input-coding-system
 => utf-8
w3m-output-coding-system
 => utf-8
w3m-use-mule-ucs
 => nil