Closed Bug 572604 Opened 14 years ago Closed 14 years ago

Don't flush layout before firing onload except when necessary

Categories

(Core :: Layout, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b2

People

(Reporter: jruderman, Assigned: bzbarsky)

References

Details

(Keywords: perf)

Attachments

(2 files)

Attached file irc conversation (deleted) —
It would be nice to fire onload as soon as all script-observable effects are ready. In particular, we generally don't need to flush layout, only style. By avoiding a layout flush, we can save time overall if the onload script causes DOM/style changes. The one case that requires flushing layout is if there are web fonts that we *might* have to load depending on the text. We should be able to detect that case cheaply and only flush layout before onload in that case. Pre-requisites: * Make nsStyleSet say whether there are any font-face rules (should be easy) * Fix talos (?)
Assignee: nobody → bzbarsky
Depends on: 379233
Attached patch Like so (deleted) — Splinter Review
Attachment #456500 - Flags: review?(dbaron)
I'd really like to land this as soon after b2 as possible so it can bake...
Comment on attachment 456500 [details] [diff] [review] Like so Getting to this point means that we've already parsed all the style sheets? (We don't need to flush anything in order to ensure that?) If so, r=dbaron.
Attachment #456500 - Flags: review?(dbaron) → review+
> Getting to this point means that we've already parsed all the style sheets? Yes.
Pushed http://hg.mozilla.org/mozilla-central/rev/a2c9de706e86 Then pushed http://hg.mozilla.org/mozilla-central/rev/3687d3cf3176 to bump assertion counts on one test that ended up asserting more of the same things it was already asserting.
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: