Open Bug 1228879 Opened 9 years ago Updated 3 years ago

spend lots of time in nsRegion::Or called from ContainerState::FinishPaintedLayerData, with lots of polygons in a leaflet map

Categories

(Core :: Web Painting, defect)

defect

Tracking

()

Tracking Status
firefox45 --- affected

People

(Reporter: dbaron, Unassigned)

References

Details

(Keywords: perf)

I was profiling the leaflet-osm-conversion branch of https://github.com/dbaron/timezone-map to figure out why it was slow in Gecko. One thing I noticed is that we're spending significant amounts of time (>10%) in nsRegion::Or called from ContainerState::FinishPaintedLayerData. This appears to be to union into containingPaintedLayerData->mDispatchToContentHitRegion and containingPaintedLayerData->mMaybeHitRegion, although it might also be including the calls through nsLayoutUtils::TransformToAncestorAndCombineRegions.
We should maybe be simplifying these regions, but it's not as straightforward as the other places that we simplify regions. We don't want to expand mHitRegion (otherwise the compositor will falsely report a hit) so maybe would could SimplifyInward the hit region, and put area that SimplifyInward discards into the maybe hit region or dispatch to content region. The maybe hit region and dispatch to content region could be simplified outward, but we are trading off having to ask the main thread about taps for a simpler region here.
Component: Layout: View Rendering → Layout: Web Painting
Webcompat Priority: --- → ?
Webcompat Priority: ? → ---

ContainerState::FinishPaintedLayerData and related code no longer exists. We should compare/profile this with current code and see if there is any issue.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.