Open Bug 1224184 Opened 10 years ago Updated 3 years ago

Dynamic toolbar hurts performance (more than in Safari)

Categories

(Firefox for iOS :: Browser, defect, P3)

Other
iOS
defect

Tracking

()

Tracking Status
fxios + ---
fxios-v6.0 --- affected

People

(Reporter: mstange, Unassigned)

References

(Blocks 1 open bug)

Details

Steps to reproduce: 0. For best effect, use a slow device like the iPhone 4S. 1. Go to planet.mozilla.org and wait for it to finish loading. 2. Do two consecutive scroll down motions. The first scroll is responsive. During the first scroll, the toolbars move out of view. The second scroll motion is delayed by about two seconds on my device. Subsequent down-scrolling is responsive again. But as soon as you scroll up, and the toolbars appear again, scrolling is delayed once more. I suspect that the web view is resized when the toolbars appear / disappear, and that causes the page to run layout with the new viewport size, which is expensive. It would be interesting to know whether Safari has optimizations to avoid changing the viewport size in some cases, or whether it can access a fast path in some way. I'm also curious why panning requires the page to be responsive at all. Shouldn't there be a 300ms timeout or something? And as far as I know, planet.mozilla.org doesn't have any touch event listeners, so even that delay should be unnecessary...
Is this only on planet.mozilla?
Any complex page will do. The more complex it is, the longer the delay.
Hey Markus, Thanks for filing this! You're suspicions on the web view being resized and causing the delay sound accurate. When the web view is scrolled, we're resizing the frame of the web view (using layout constraints) as the url bar is moving up and down. The second scroll action might be delayed because of a relayout happening within the web view. If this occurs on complex web sites only then it sounds like it might be the culprit. Could you link a few more sites you're having issues with?
I can reproduce this issue on iPhone 4S running iOS 9.3.2. Tested on latest master.
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.