Closed Bug 351915 Opened 18 years ago Closed 15 years ago

100% cpu usage with http://www.o2.pl

Categories

(Core :: Layout, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: d4rt, Unassigned)

References

()

Details

(Keywords: perf, Whiteboard: [reflow-refactor])

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1b2) Gecko/20060908 Firefox/2.0b2
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1b2) Gecko/20060908 Firefox/2.0b2

After visiting http://www.o2.pl my cpu usage goes to 100%. Firefox is responsive though. It is not plugins fault as I uninstalled everything and it was still the same.

Reproducible: Always

Steps to Reproduce:
1.Load http://www.o2.pl

Actual Results:  
Cpu usage goes to 100%

Expected Results:  
Cpu usage should remain in normal (low) state.
WFM, without a hitch in the CPU usage.

Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; fr-FR; rv:1.8.1b2) Gecko/20060908 BonEcho/2.0b2 ID:2006090803

Does it happen also in safe mode?
Also deactivate javascript. Does that help?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060908 Minefield/3.0a1
A lot of CPU usage on that site, but not a hang.
With javascript turned off everything goes back to normal. It's not a real solution to the problem though ;)
(In reply to comment #4)
> With javascript turned off everything goes back to normal. It's not a real
> solution to the problem though ;)

This issue is raised by the js news script. It sets a timeout from 50 ms between each written letter. If the line is finished the script waits 3000 ms where the cpu load goes back to normal.

Here the source:

> function dzwon_step() {
>        if (dz_pos < dz_str.length) {
>                dz_obj.innerHTML = dz_str.substr(0,dz_pos) + '_';
>                dz_pos++;
>                dz_hdlstep = setTimeout("dzwon_step()", 50);
>        } else {
>                dz_obj.innerHTML = dz_str + '&nbsp;<span style="color:red;font-weight:bold;">&raquo;</span>';
>                dz_hdlmsg = setTimeout("dzwon_msg()", 3000);
>        }
> }

Boris, are we too slow updating the innerHTML content?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Yeah, basically.  Updating it involves redoing the layout of everything that might depend on that content, and if you have enough nested tables that's currently everything.

On reflow branch, I still see close to 100% CPU usage on my P3-733, but the time spent in layout is about 10-20 times smaller than on trunk and the text appears _much_ faster.  So once reflow branch lands people should retest.

Note that just "cpu usage is 100%" doesn't necessarily constitute a bug, unless you can prove that we really shouldn't be taking up CPU...  ;)
Component: General → Layout
Keywords: perf
Product: Firefox → Core
QA Contact: general → layout
Whiteboard: [reflow-refactor]
Version: unspecified → Trunk
http://www.o2.pl/ plays nice with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3) Gecko/20090305 Firefox/3.1b3
=> WFM
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.