Closed
Bug 481128
Opened 16 years ago
Closed 2 years ago
HTML5 is slow to load
Categories
(Core :: Layout, defect, P4)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: ian, Unassigned)
References
(Depends on 2 open bugs, )
Details
(Keywords: perf)
Attachments
(1 file)
4.18 KB,
patch
|
Details | Diff | Splinter Review |
HTML5 is slow to load in Firefox.
Specifically, the time to parse and lay out the document is slower than other browsers (Opera and Webkit in particular).
TESTCASE
http://damowmow.com/playground/bugs/slow/html5/001/?slow-browser
There's a tarball:
http://damowmow.com/playground/bugs/slow/html5/001/html5-perf-001.tar.gz
http://damowmow.com/playground/bugs/slow/html5/001/README
You have to run the test case with "?slow-browser" on the end of the URL to disable the scripts, which would detract from the load issue.
See also bug 475721.
Blocks: 475606
Comment 2•16 years ago
|
||
Fwiw, over here webkit trunk loads in about 5.5 seconds uncached, 3.5 seconds cached. Opera 9.6 is 14s uncached, 11s cached. Firefox trunk is 11s uncached, 7s cached.
Working on getting some profiles now.
Comment 3•16 years ago
|
||
Lessee. 20% reflowing off reflow events. Another 15% reflowing off paint events via [NSView _drawRect:clip:] calling [ChildView drawRect:]. Another 15% reflowing off paint events via [NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] calling _drawRect:clip: and then as above. That's 50% of pageload right there. Compositor might or might not help with this.
nsBidiPresUtils::Resolve takes about 6% of total pageload (so about 1/9 of reflow or so).
3% is restyle processing from painting, with stacks as for reflow above. 2% is actual painting.
About 25% of the time is under nsCSSFrameConstructor::ContentAppended. A bunch of that is style resolution (e.g. 15.6% of that 25% is in, not under, SelectorMatches). To be precise, about 13% of total pageload is under ResolveStyleContext. 40% of that is RuleProcessorData construction, the rest FileRules. The remainder of the ContentAppended time is spread over various other parts of frame construction.
In other words, typical "big page load" profile. :(
Updated•16 years ago
|
Depends on: compositor, 475721
I'm seeing more like 10% of the time under ContentAppended, and 40% of the time under ViewportFrame::Reflow. Did reflow here get worse somehow? Maybe I should try again with ireflow disabled...
So earlier today I was under the impression that the spec took so long to load that I wasn't able to wait for it to finish... although I think that was actually just under callgrind instrumentation. (Though I'd thought I'd checked uninstrumented too.)
In any case, I debugged things a little, suspecting (and seeing, in reflow dumps) an O(N^2) reflow problem, and wrote this patch to fix the case where lines were erroneously (in my opinion) being marked dirty.
But I think I was somehow imagining the performance problem being as bad as I thought it was, and I really don't know if this would help much.
I'm also not convinced of the correctness of this patch in the presence of incremental reflow, although I think it's probably right.
Comment 6•15 years ago
|
||
> and 40% of the time under ViewportFrame::Reflow. Did reflow here get worse
> somehow?
Note that in comment 3 50% of the time was under reflow.
Comment 7•14 years ago
|
||
Current numbers (on a much bigger spec) are 12s cached for Gecko and 10s cached for webkit.
Updated•14 years ago
|
Priority: -- → P3
Updated•14 years ago
|
Priority: P3 → P4
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Comment hidden (offtopic) |
Comment hidden (offtopic) |
Comment hidden (offtopic) |
Updated•5 years ago
|
Assignee: bzbarsky → nobody
Updated•2 years ago
|
Severity: normal → S3
Comment 11•2 years ago
|
||
This test case is very fast now.
Status: NEW → RESOLVED
Closed: 2 years ago
Component: DOM: Core & HTML → Layout
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•