Open Bug 1617979 Opened 4 years ago Updated 1 year ago

Reduce Renderer initialization time on Android

Categories

(Core :: Graphics: WebRender, defect, P3)

All
Android
defect

Tracking

()

People

(Reporter: mstange, Unassigned)

References

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

Details

(Whiteboard: wr-android)

On Android, every tab gets its own window widget, and its own WR renderer.

On a Moto G5, creating a new renderer takes 10ms-20ms at the moment. Some of this blocks the parent process main thread during a sync message (~14ms). That's not a lot but it might still be good to reduce it some more.

Profile: https://perfht.ml/32pIRFT

Depends on: 1617982

Is there any way we could make it not get its own WR renderer? That seems like a potential memory issue if every tab allocates its own texture cache etc?

I would have preferred that solution, but this seems to have been an intentional decision at the GeckoView API level: They don't want to have a difference between tabs and windows at the API level, and they want multiple GeckoSessions to be able to be shown on the screen at the same time.

It would be nice if we could share texture caches between windows instead. This would also benefit multi-window RAM usage on Desktop.

Perhaps to alleviate some memory issues with that approach in the meantime, we could send MemoryPressure messages to WR instances that are in background tabs (maybe only ones that haven't been activated for some time). That would give WR a chance to drop texture / picture cache memory.

Priority: -- → P3
Blocks: 1619409

(In reply to Glenn Watson [:gw] from comment #3)

Perhaps to alleviate some memory issues with that approach in the meantime, we could send MemoryPressure messages to WR instances that are in background tabs (maybe only ones that haven't been activated for some time). That would give WR a chance to drop texture / picture cache memory.

I've filed bug 1619414 on this.

Blocks: wr-android
Whiteboard: wr-android
Blocks: wr-android-perf
No longer blocks: wr-android
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.