Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

iPhone 6 animation performance cut in half #3005

Closed

Description

@1ec5

To state the obvious, #2922 cuts the maximum framerate down from 60fps to 30fps. Prior to #2922, MGLMapView would pan smoothly at 60fps (as confirmed by Xcode) on my iPhone 6 running iOS 9.1. Now it maxes out at 30fps, causing every animation to be choppy to an extent that’s difficult to ignore. (An MGLTargetFrameInterval of 1 unsurprisingly feels great.) Perhaps 30fps is beneficial for the iPod touch @adam-mapbox was testing on, but that should not come at the cost of performance on more current or more powerful hardware, where there is a greater expectation of smooth animations.

/cc @adam-mapbox @incanus @friedbunny @jfirebaugh

Activity

  1. added
    iOS
    performance
    on Nov 11, 2015
  2. added this to the ios-v3.0.0 milestone on Nov 11, 2015
  3. incanus commented on Nov 11, 2015

    @incanus
    Contributor

    Maybe we can take a naive first cut at dividing devices into two camps — lower-end and higher-end — and choosing 30 or 60 as a result. Lower-end would probably include:

    • Both iPod touch generations
    • iPad <= 3
    • iPad mini <= 2
    • iPhone <= 5

    Something like that?

  4. adam-mapbox commented on Nov 11, 2015

    @adam-mapbox
    Contributor

    We can also try just making it 60 fps. The essence of the fix is to do
    things on a regular basis, not necessarily what exactly that basis is. It
    might be "good enough", even on slower devices. I can take a look at this.

    A better fix would be to do what Justin suggested.

    On Wed, Nov 11, 2015 at 3:07 PM, Justin R. Miller [email protected]
    wrote:

    Maybe we can take a naive first cut at dividing devices into two camps
    — lower-end and higher-end — and choosing 30 or 60 as a result. Lower-end
    would probably include:

    • Both iPod touch generations
    • iPad <= 3
    • iPad mini <= 2
    • iPhone <= 5

    Something like that?

    —
    Reply to this email directly or view it on GitHub
    #3005 (comment)
    .

  5. 1ec5 commented on Nov 11, 2015

    @1ec5
    ContributorAuthor

    I’ve been playing around with MGLTargetFrameInterval set to 1 all day on the aforesaid iPhone 6, and it feels great. Let’s treat 60fps as the default, then blacklist devices that are known to perform poorly, such as iPod touch.

  6. adam-mapbox commented on Nov 12, 2015

    @adam-mapbox
    Contributor

    Sure, sounds good. I'd like to do a little bit of testing on my own time
    about this, but I think this should work for now.

    On Wed, Nov 11, 2015 at 3:45 PM, Minh Nguyễn [email protected]
    wrote:

    I’ve been playing around with MGLTargetFrameInterval set to 1 all day on
    the aforesaid iPhone 6, and it feels great. Let’s treat 60fps as the
    default, then blacklist devices that are known to perform poorly, such as
    iPod touch.

    —
    Reply to this email directly or view it on GitHub
    #3005 (comment)
    .

  7. self-assigned this
    on Nov 12, 2015
  8. adam-mapbox commented on Nov 12, 2015

    @adam-mapbox
    Contributor

    @1ec5 I went ahead and did some testing on this on the iPod touch, and it's going to be totally fine on all devices. As I suspected, it's the act of doing things on a regular tick that helps the framerate's visible appearance, not so much when the tick arrives. So even if the device can't quite keep up, it still is visually pleasing.

  9. 1ec5 commented on Nov 13, 2015

    @1ec5
    ContributorAuthor

    🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

iOSperformance

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions