Closed Bug 1363929 Opened 4 years ago Closed 4 years ago
IFrame::In3DContext And Backface Is Hidden could be faster
I just profiled scrolling my facebook timeline. I noticed about 0.15% of the time being spent in nsIFrame::Combines3DTransformWithAncestors being called from nsIFrame::In3DContextAndBackfaceIsHidden. So In3DContextAndBackfaceIsHidden does two tests, both of which are likely to fail the vast majority of the time, separated by an &&. I think the one that's currently *second* is likely to be the faster test, because BackfaceIsHidden() initially tests style data on the frame itself, whereas Combines3DTransformWithAncestors initially walks up to the parent frame and tests style data on it. So I think the BackfaceIsHidden test is likely to fail faster simply due to less pointer chasing.
Attachment #8866587 - Flags: review?(matt.woodrow)
Attachment #8866587 - Flags: review?(matt.woodrow) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/0515ebda07af3263ab124ba1a6eabe212e9e1b89 Bug 1363929 - Swap the order of tests in nsIFrame::In3DContextAndBackfaceIsHidden so that the faster-to-fail one is first. r=mattwoodrow
You need to log in before you can comment on or make changes to this bug.