Ionic-framework: Perf(Scrolling): passive event listeners

Created on 4 Jul 2016  ·  3Comments  ·  Source: ionic-team/ionic-framework

Passive Event Listeners are already available in stable Chrome 51 and the same version for Android has already been released ( http://googlechromereleases.blogspot.com.es/2016/06/chrome-for-android-update.html ).

Also, the WebKit team at Apple has announced they will support it. https://bugs.webkit.org/show_bug.cgi?id=149466

So I think it is a good moment to test and measure in what parts of the framework we can use this feature: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md

  • [x] Identify what parts of the framework can take advantage of it
  • [x] Implement a feature detection for Passive Event Listener ( {passive: true} is interpreted as capture: true in older UA
  • [x] Provide an abstraction (maybe through UIEventManager?)

Most helpful comment

Any update on this? There has been huge impact on my existing apps. In some devices(android 4.2.0 chrome 52) scroll doesn't work at all. While in some devices (android 6.0.1, chrome 52) scroll is very sluggish.
It gives following error in console
"Handling of 'touchstart' input event was delayed for 158 ms due to main thread being busy. Consider marking event handler as 'passive' to make the page more responsive"

Any update on how to fix this.

All 3 comments

Any update on this? There has been huge impact on my existing apps. In some devices(android 4.2.0 chrome 52) scroll doesn't work at all. While in some devices (android 6.0.1, chrome 52) scroll is very sluggish.
It gives following error in console
"Handling of 'touchstart' input event was delayed for 158 ms due to main thread being busy. Consider marking event handler as 'passive' to make the page more responsive"

Any update on how to fix this.

Implementing this would be really nice since the scroll has become really sluggish now

@neelkamal0666 @RonCan we have added support for passive events in important parts across the framework in the last weeks.

Was this page helpful?
0 / 5 - 0 ratings