As I understand the perfomance issue if related to shadow DOM only which I 
don't use. Also, I never used gestures layer so I can still use Polymer 
PointerEvents without performance degrade impact?

On Tuesday, April 15, 2014 1:14:14 AM UTC+2, Daniel Freedman wrote:
>
> Hi Polymer users,
>
> We recently had a big perf investigation of mobile use cases and found 
> that our gesture layer was not performant enough to get 60 FPS[1].
> For this reason, I have created the polymer-gestures library which gesture 
> events in a mobile-performant way.
>
> In the next release, polymer-gestures will replace (the now deprecated) 
> PointerGestures, and PointerEvents will be removed from the default build.
>
> These are the supported events of polymer-gestures:
>
>    - down
>    - up
>       - Same target as down, provides the element under the pointer with 
>       the relatedTarget property
>    - trackstart
>    - track
>       - Same target as down
>    - trackend 
>       - Same target as down, provides the element under the pointer with 
>       the relatedTarget property
>    - tap
>       - Targets the nearest common ancestor of down and up.relatedTarget
>       - Can be prevented by calling any gesture event's preventTap 
>       function 
>    - flick *
>    - hold *
>    - holdpulse *
>    - release *
>    - pinchstart *
>    - pinch *
>    - pinchend *
>
> * = "Not yet implemented"
>
> If you listen for pointerdown, pointermove, pointerup, pointerover, 
> pointerout, pointerenter or pointerleave, you will need to change your code.
> If you require an event for every movement of the pointer, you can use the 
> "track" event.
>
> This change was not made lightly, but only after careful consideration of 
> device constraints and lack of cross-browser PointerEvent implementations.
> The Polymer team still believes that PointerEvents are the best technical 
> solution for handling user input, but mobile use cases are too important to 
> be gated on native implementations.
>
> I apologize for the churn.
>
>
> [1]: The big culprit was the gymnastics the PointerEvents polyfill had to 
> make to be spec compliant and target the correct elements with ShadowDOM.
> In particular, the encapsulation mechanics of ShadowDOM made target 
> finding for pointermove very expensive, requiring recursive 
> elementFromPoint calls.
> Another large chunk of time was wasted on having gesture recognizers 
> listen for dispatched, normalized pointerevents.
> Polymer-gestures will use the lower-level events directly without spinning 
> up the DOM event system N times each pointer movement.
>  

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/724809a4-cc2b-4f0c-ad13-1416bff1cb68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to