Open Bug 2054217 Opened 1 day ago Updated 1 day ago

[IPC Urlbar] Bake dynamic results' view update to skip the IPC round-trip for pure providers

Categories

(Firefox :: Address Bar, task)

task

Tracking

()

People

(Reporter: dao, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Whiteboard: [sng][mcab-hnt])

Broken out from Bug 2054070.

Bug 2054070 bakes a dynamic result's view template and menu commands onto UrlbarResult so the view can read them synchronously on both transports -- the view reads them while building the row's DOM, so on the actor message path they can't be fetched across the boundary on demand. getViewUpdate is left dynamic and round-trips over the actor, since the view already awaits it.

That round-trip is correct but adds an IPC delay before a dynamic result is fully rendered, which will make the newtab searchbar less responsive once <moz-urlbar> runs in a content process. When a provider's getViewUpdate is pure (the same result always produces the same view update), the update could be baked alongside the template and read synchronously, avoiding the round-trip.

This needs a purity audit of the getViewUpdate implementations before baking: at least the stock-data opt-in provider's getViewUpdate is known not to be pure, so it (and any others found impure) would keep round-tripping. Worth Drew's input as the dynamic-results architecture owner.

Blocks: ipc-urlbar
You need to log in before you can comment on or make changes to this bug.