Closed
Bug 725920
Opened 13 years ago
Closed 13 years ago
Firefox extremely slow when loading my Ogre3d port
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla13
People
(Reporter: ehsan.akhgari, Assigned: bhackett1024)
References
()
Details
(Keywords: perf)
Attachments
(1 file)
27.42 KB,
patch
|
dvander
:
review+
|
Details | Diff | Splinter Review |
I've been working on a port of the Ogre3d game engine to js using Emscripten. When I load the port in Firefox, it starts to use 100% of CPU and it doesn't even show the slow script dialog. The profiler tells me that all of this time is being spent in ScriptAnalysis::AnalyzeSSA. Chrome can load this demo and run it in a matter of a few seconds.
Please see the URL for the demo page (warning, large file, ~136MB).
Comment 1•13 years ago
|
||
Just a guess, but this might be caused by the same problem in bug 687127. Might be worth testing with the patch there.
Comment 2•13 years ago
|
||
The fix for that bug landed, and it doesn't help with this one, sadly.
I also get a very very long stall of the browser, without the slow script dialog. It's so long I eventually gave up.
Assignee | ||
Comment 3•13 years ago
|
||
Make some efficiency improvements to the SSA analysis to avoid blowup when dealing with long scripts with lots of branching. Information for switch statements with lots of targets is consolidated, and tracking info for pending branches is restructured to avoid walking the same information over and over when lazily constructing phis at those branch targets.
With this patch applied, I get an 11 second pause to do the initial parse, and a couple 1-2 second pauses for analyzing SSA info in some very large scripts on the page. Other than that things load OK. I'm not sure if there are more efficiency improvements to fix those 1-2 analysis times, but if not then we'll want to investigate keeping that information around longer (the SSA info is thrown away on GC and is recomputed afterwards).
Assignee: general → bhackett1024
Attachment #598966 -
Flags: review?(dvander)
Comment 4•13 years ago
|
||
(In reply to Brian Hackett (:bhackett) from comment #3)
> With this patch applied, I get an 11 second pause to do the initial parse,
> and a couple 1-2 second pauses for analyzing SSA info in some very large
> scripts on the page.
When you say '11 second pause to do the initial parse' do you literally mean the frontend or do you mean frontend + SSA analysis?
Assignee | ||
Comment 5•13 years ago
|
||
Just the frontend. I instrumented the code with timers, ran the page twice and got 11.9 seconds both times for the initial frontend::CompileScript.
Comment 6•13 years ago
|
||
Wow, that's enormous! How does Chrome compare?
Assignee | ||
Comment 7•13 years ago
|
||
Chrome takes about 20 seconds to load the page for me, so there's not really a huge difference here (though Chrome, of course, remains interactive, but that's a job for bug 718121).
Comment 8•13 years ago
|
||
Ok, so our parsing isn't inordinately slow. I guess for any real apps that want to use this the app cache may help out by using XDR instead of parsing.
Updated•13 years ago
|
Attachment #598966 -
Flags: review?(dvander) → review+
Assignee | ||
Comment 9•13 years ago
|
||
Comment 10•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
You need to log in
before you can comment on or make changes to this bug.
Description
•