Bug 108116 - Konqueror takes a lot of CPU even with bells and whistles blocked in www.postimees.ee
Summary: Konqueror takes a lot of CPU even with bells and whistles blocked in www.post...
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-25 15:42 UTC by Hasso Tepper
Modified: 2008-06-15 06:53 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hasso Tepper 2005-06-25 15:42:25 UTC
Version:           3.4.0 (using KDE 3.4.89 (>= 20050615), compiled sources)
Compiler:          gcc version 3.3.6 (Debian 1:3.3.6-7)
OS:                Linux (i686) release 2.6.12

http://www.postimees.ee - a lot of animated gifs, flash etc. Thanks to adblock feature I blocked all of these, but konqueror still takes 40% of CPU on my 2,4GHz PIV with just showing this opening page. Plugins are disabled for .postimees.ee and adblock configuration contains these relevant entries
(hide filtrered images is also on):

http://www.postimees.ee/ads/*
http://www.postimees.ee/*banner*/*
http://adsection.on24.ee/*
http://www.postimees.ee/img/ilm/aike.gif
http://www.postimees.ee/img/ilm/selgevihm.gif
http://www.postimees.ee/img/ilm/vahelduv.gif
Comment 1 Ivor Hewitt 2005-07-04 22:49:30 UTC
If you turn off javascript cpu load drops down.
Looking at the script the culprit appears to be some sort of banner scroller. 

In their set_position timer callback, is the code:

	if(ch!=oldch){
...
		setTimeout("set_position()", 40);
		//alert(ch+" - "+oldch);
	}else{setTimeout("set_position()", 0);}

Which in konqueror is causing set_position to be called constantly in a loop. I can't find any reference that states what setTimeout with a time of zero should be doing, but if IE and firefox ignore it I guess we should too.
Comment 2 Ivor Hewitt 2005-07-05 16:41:20 UTC
Hmm, creating a testcase that just loops with setTimeout(0) doesn't show the same load. It seems to need the additional getObj calls and style set calls to affect the cpu load.
Also... both IE and Firefox do loop infinitely on that page so that theory is wrong. :)
Comment 3 FiNeX 2008-04-07 00:57:57 UTC
Tested on 4.0.3. It doesn't use a lot of CPU... not more than other websites.
Comment 4 George Goldberg 2008-06-15 06:53:38 UTC
Appears to be fixed in svn trunk r820659