The default bug view has changed. See this FAQ.

Hang for several Seconds with several hundred window.addEvent() functions

NEW
Unassigned

Status

()

Core
DOM
--
major
7 years ago
6 years ago

People

(Reporter: Vincent Lefevre, Unassigned)

Tracking

({hang, testcase})

2.0 Branch
hang, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: DUPEME, URL)

Attachments

(2 attachments)

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-GB; rv:1.9.2.7) Gecko/20100713 Firefox/3.6.7
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-GB; rv:1.9.2.7) Gecko/20100713 Firefox/3.6.7

On some pages, Firefox freezes for more than 10 seconds. During this time, I can do nothing with Firefox.

Reproducible: Always

Steps to Reproduce:
1. Open the above URL.
Actual Results:  
Most of the page is rendered in the first few seconds, except "Liste des films". Then Firefox freezes for about 20 - 25 seconds. During this time, the mouse pointer is replaced by a wheel, and I cannot use Firefox (not even minimize the window). Firefox takes more than 100% CPU time.

Expected Results:  
While the page is being rendered, one should be able to use Firefox, e.g. the other tabs.

I suppose that a web site could freeze Firefox for an arbitrary amount of time, by doing the same kind of things.
(Reporter)

Comment 1

7 years ago
Created attachment 458848 [details]
Sample information (each 10 msecs 1000 times) during the freeze

Updated

6 years ago
Version: unspecified → 3.6 Branch
(Reporter)

Comment 2

6 years ago
I've tried to reproduce the problem on a Linux machine, and it is a bit difficult because the machine is much faster. I used cpulimit to limit the CPU%, and I could reproduce the freeze with:

  Mozilla/5.0 (X11; Linux x86_64; rv:6.0a1) Gecko/20110515 Firefox/6.0a1

Updated

6 years ago
Version: 3.6 Branch → 4.0 Branch
I am seeing this with Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1. Getting a freeze of approx 5-7 seconds, with a CPU usage on one core spiking up to about 85%. I'll try to throw a testcase together.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: hang, testcase-wanted
OS: Mac OS X → All
Hardware: PowerPC → All
Summary: Firefox freezes for 20 - 25 seconds on lyonpoche.com → Firefox freezes for several seconds on lyonpoche.com
Created attachment 536203 [details]
Testcase

Looks like this may be caused by a large number of window.addEvent, I think it was 488 or so.

Updated

6 years ago
Assignee: nobody → general
Component: General → JavaScript Engine
Keywords: testcase-wanted → testcase
Product: Firefox → Core
QA Contact: general → general
Version: 4.0 Branch → 2.0 Branch

Updated

6 years ago
Summary: Firefox freezes for several seconds on lyonpoche.com → Hang for several Seconds with several hundred window.addEvent() functions
The addEvent per se is not the problem.  All of those functions are onload handlers, so they're all called at onload.  On my machine that takes about 1.5s (in Firefox; about 3s in Chrome ad 5s in Opera). 

The actual time this takes to run is mostly getting attributes, getting stuff from content lists, JS execution.  All things we're working on.

So apart from that there are two issues:

1)  The slow script warning doesn't fire if we keep entering and exiting scripts (as here).  There's an existing bug on that, I think.

2)  We have only one process.  We have an existing bug on e10s.
Assignee: general → nobody
Component: JavaScript Engine → DOM
QA Contact: general → general
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.