Skip to content

Ember's use of touch event listeners can be bad for scroll performance #12783

@RByers

Description

@RByers

Ember indiscriminately adds touch event listeners to the root element (eg. body). This means that scrolling any page that uses ember will need to be blocked on whatever JS is running. For some sites this is fine (never run anything longer than ~50ms) but for many others it results in a terrible user experience on browsers that dispatch touch events.

I came across this when doing a performance audit of this Nasa page. The page has all sorts of performance problems on mobile, but if you remove the Ember touch event listeners (or force them to be 'passive') it scrolls beautifully.

I'm working on adding a feature to the web called passive event listeners which may make it at lot easier for you to solve this problem. I'd love any feedback you have (feel free to file issues here).

I don't know Ember at all, so it's not at all clear to me what would need to change in Ember to fully adopt such a model. If the basic idea seems sound to you, perhaps we can use this issue to discuss how Ember may be able to adopt it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions