Closed Bug 709217 Opened 13 years ago Closed 8 years ago

Other browsers are more responsive than Firefox while doing jQuery

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
Tracking Status
platform-rel --- -

People

(Reporter: taras.mozilla, Unassigned)

References

Details

(Whiteboard: [Snappy:P3] [platform-rel-jQuery])

Attachments

(1 file, 1 obsolete file)

Attached file demo (obsolete) —
We lock up the browser for a while(until slow script warning pops up), chrome handles this better. Opera seems to do some clever throttling so the UI gets laggy while page is in foreground and less laggy while it's in background. Can we do something similar to Opera?
You're talking about the initial pageload, right?

Chrome completely locks up the renderer process here for about 15 seconds.  The only reason it's at all responsive for the UI is the multiprocess bit.

Opera runs JS in an interruptible fashion (whether separate thread or on-stack replacement, I can't recall), last I checked.  So yes, it can do some sort of throttling and whatnot.  It can also repaint and reflow in the middle of script execution.  In Opera the script takes about 30 seconds to run for me.

We run the script in about 25 seconds.  I'll see whether we can make that faster, but to make UI responsive while the script is running will fundamentally require something like e10s or interrupting the JS engine or _something_.
I think we need to evaluate how much work this would be.
Depends on: js-unwind
And to be clear, the fundamental issue is that the function passed to $() runs for 25 seconds without ever coming back to the event loop in this case.
No longer depends on: js-unwind
Depends on: js-unwind
(In reply to Boris Zbarsky (:bz) from comment #3)
> And to be clear, the fundamental issue is that the function passed to $()
> runs for 25 seconds without ever coming back to the event loop in this case.

Indeed, thus 384412.

Marco I appreciate your help with triage, but please don't edit dependencies on my bugs.
No longer depends on: electrolysis
For what it's worth, once I'm done with bug 709256 the time here will be closer to 16 seconds than 25 seconds.  Still not great, obviously.
Whiteboard: [Snappy] → [Snappy:P3]
Whiteboard: [Snappy:P3] → [Snappy:P3] [platform-rel-jQuery]
platform-rel: --- → ?
Attached file updated demo
(Updating demo to point to https jquery CDN assets)
Attachment #580476 - Attachment is obsolete: true
Behavior seems about the same as Chrome in Dev Edition 49 (w/ e10s enabled). Let's close.
Status: NEW → RESOLVED
Closed: 8 years ago
platform-rel: ? → -
Resolution: --- → WORKSFORME
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: