googlearchive / core-scroll-header-panel

Fancy scrolling effects where the header animates between tall and condensed states
19 stars 16 forks source link

Lags with condenses option on mobile #29

Open amannn opened 9 years ago

amannn commented 9 years ago

The transformation that is being done with the condenses option feels pretty laggy on a mobile device with Chrome 39. I've also tried to deploy it through a Cordova Chrome App, but the result is the same. Is there some optimization possible or are these the boundaries of a mobile web app?

frankiefu commented 9 years ago

It seems ok to me when I tried the demo on Chrome 39 on Nexus 5. The header transformation is implemented such that it doesn't trigger paint. If you see the behavior is different on your app compare to the demo then it's possible something else that triggering paints while scrolling and thus causing scrolling-coupled effects (e.g. header transformations) to be laggy. For example, the content in the scroll area or if you use multiple backgrounds on the condensed header.

shaulhadar commented 9 years ago

Hi, checked also on chrome 39 on lg g2, and there is a bug, but I see a different bug. The performance is actually good, but there is a bug that if you scroll the page upwards and still touch the screen, and than scroll downwards (screen still pressed) , the animation effect won't fire until you remove the finger from the screen, which is quite annoying, I hope it can be fixed...

shaulhadar commented 9 years ago

I checked the polymer demo app in google play, and it's scroll header panel works a bit different, you don't have the bug I wrote before, but the animation is shaky.......is there going to be any update to the demo app? I think it's not using the latest code or something......

frankiefu commented 9 years ago

@amannn The demo page seems to be showing ~60fps on Chrome 39 on Nexus 5. If you have a test page showing the "very laggy" issue we can take a look.

@shaulhadar The demo app on Google Play Store is not maintained by Polymer Team.

amannn commented 9 years ago

Maybe you're right and it's some of my other UI components causing the framerate to drop. I'll check soon. Thanks anyhow for your quick response!