Open Bug 1393594 Opened 7 years ago Updated 2 years ago

Facebook calls get_offsetWidth a bunch of times during load event handling

Categories

(Core :: Layout, enhancement, P3)

enhancement

Tracking

()

Tracking Status
firefox57 --- wontfix

People

(Reporter: jrmuizel, Unassigned)

Details

See http://bit.ly/2wCqNvc

Facebook is doing 7 reflows when handling the load event. Is it possible for them to do better?
Flags: needinfo?(b56girard)
Facebook suggests that these reflows (from ViewportTrackingHelper) account for just 0.5% of our startup time in Chrome. Data does look suspiciously low to be fair.

Facebook could mitigate this by using the same layout flush to check all viewport tracking but that's not a simple change. There's also the option of using IntersectionObserver which is now shipping.
Flags: needinfo?(b56girard)
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.