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.

[macOS] Performance issues on Macbook (early 2016) #7820

Closed

Description

@tkrajacic

When running the latest macOS demo app, there are some performance issues on my Macbook.

I have recorded this using Quicktime player and you can download a mov file here:
Dropbox Link

Of course the Macbook doesn't have a lot of power, but what strikes me as odd is that I see heavy CPU usage while zooming and scrolling but almost no GPU usage (I am using iStat menus for this). The CPU is of course a very limiting factor on this machine (only 2 cores iirc).

There are two things to note in the recording:

  • I am using the trackpad to very smoothly zooming in and out (The sudden changes in zoom are not because of my sudden behavior)
  • When blanketing the map with pins there is lots of flickering. Sometimes this is not only the pins, but also the map flickering white.

Both problems vary in intensity when repeating the test.

/cc @1ec5

Platform: macOS 10.12.2 on Macbook (early 2016)
Mapbox SDK version: 0.3.0

Steps to trigger behavior

  1. Open example app
  2. zoom and scroll around
  3. trigger blanketing of map with pins

Expected behavior

  • Smooth experience

Actual behavior

  • Severe stuttering and sometimes flickering when blanketing map

Activity

  1. added
    macOS
    performance
    on Jan 23, 2017
  2. friedbunny commented on Jan 23, 2017

    @friedbunny
    Contributor

    I see similar performance issues on my MacBook Pro (Retina, 13-inch, Early 2015).

  3. 1ec5 commented on Jan 24, 2017

    @1ec5
    Contributor

    When blanketing the map with pins there is lots of flickering. Sometimes this is not only the pins, but also the map flickering white.

    This sounds like #7616, which also affects iOS SDK v3.4.0 and has been fixed on the master branch for v3.5.0 and v0.4.0.

  4. modified the milestones: ios-v3.4.1, macos-v0.3.1 on Jan 24, 2017
  5. 1ec5 commented on Jan 25, 2017

    @1ec5
    Contributor

    I see heavy CPU usage while zooming and scrolling but almost no GPU usage

    Sounds like #7834 could be the cause in that case.

  6. kkaefer commented on Jan 25, 2017

    @kkaefer
    Member

    I can also replicate this behavior with the integrated GPU of a quad core Macbook Pro 2016. When rendering locks up, I'm not seeing heavy CPU usage (~2%) though.

  7. kkaefer commented on Jan 25, 2017

    @kkaefer
    Member

    (#7834 allows testing the integrated GPU on dual-GPU Macs)

  8. kkaefer commented on Jan 25, 2017

    @kkaefer
    Member

    I tested this with a patched version of GLFW that supports integrated GPUs, and got flawless, fast rendering with the built-in GPU. This leads me to believe that there's something we're doing wrong when initializing our OpenGL context.

  9. 1ec5 commented on Jan 25, 2017

    @1ec5
    Contributor

    Probably unlike GLFW, we're rendering onto a layer-backed view, which on macOS means WindowServer has to do compositing for the view. (This enables things like visual effect views and the attribution view, similar to on iOS.) What happens if you turn off layer-backing? (Turn off "full window content view" in NSWindow's Attributes inspector and ensure no views are selected in the Effects inspector.)

  10. 1ec5 commented on Jan 26, 2017

    @1ec5
    Contributor

    By the way, I just cherry-picked #7834 into the release-ios-v3.4.0 branch (for v0.3.1) as #7861.

  11. kkaefer commented on Feb 9, 2017

    @kkaefer
    Member

    What happens if you turn off layer-backing?

    Same, super sluggish behavior.

  12. 20 remaining items

  13. reza-ebrahimi commented on Mar 26, 2018

    @reza-ebrahimi

    I have to confirm this problem on iOS and macOS #11518

  14. removed this from the macos-v0.12.0-horchata milestone on Nov 8, 2018
  15. added
    archived
    on May 7, 2019
  16. stale commented on May 7, 2019

    @stale

    This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    archivedbugmacOSperformance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions