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.

Make map more fluid #2411

Closed
Closed

Description

@ljbade

Even after #2409 there is still some work to be done.

Google Maps still feels much more fluid in response to gestures and animations.
#2410 should improve animations, but gestures are still a bit janky.

I don't think this is a GL performance issue as it seems we can easily hit 140 FPS on my Samsung S6.

This is more about avoiding any frame skipping and improving the lag between touch input and pixels on the screen.

There is also still a very small 1-2 frame lag between the map and the GPS marker position,

Activity

  1. added
    performance
    Android
    on Sep 24, 2015
  2. ljbade commented on Sep 24, 2015

    @ljbade
    ContributorAuthor

    Did some logging and found the delay between map and the GPS marker.

    TextureView has a 1 frame lag between a a render and when it appears on screen.

    Only way I can see to fix this would be to capture the calculated positions of the GPS marker at render time, save it, them update the view at onSurfaceTextureUpdated

    Going to try this.

  3. ljbade commented on Sep 24, 2015

    @ljbade
    ContributorAuthor

    Didn't seem to make a difference.

    I wonder if it's possible to capture the GPS marker, or render it into a offscreen buffer then overlay it in GL.

    @incanus How much lag does iOS now have with the GPS marker?

  4. incanus commented on Sep 24, 2015

    @incanus
    Contributor

    I wonder if it's possible to capture the GPS marker, or render it into a offscreen buffer then overlay it in GL.

    This is the approach I tried in #1125 (comment). It's a proven concept and needs development time, which will probably be easier on iOS.

    How much lag does iOS now have with the GPS marker?

    None, nor has it had any in any release. We solved this problem. The trick is updating the GPS marker position using the geo-to-pixel conversion routines with the same iteration of TransformState as the GL frame was drawn. Has to be exact.

  5. tobrun commented on Sep 27, 2015

    @tobrun
    Member

    I tried pinpointing some stuff using the improved GPU profiler on Marshmallow. I wanted to showcase this tool because I think we should really been using this.

    Legenda:

    In upcoming screenshots you will see bars. A bar represents the frame time, the horizontal green line represents the magic 16ms border. A frame going above this border will be dropped and the user will notice a stutter. A bar consist out of multiple colors, image below explains the different colors:

    screen shot 2015-09-27 at 11 54 41

    Panning

    This feels responsive and the profiler shows the same:

    panning_around_map_same_zoom_level

    Double tap zoom

    This feels responsive and the profiler shows the same:

    zooming_double_tap

    Loading new tile

    Occasionally you see spikes for Swapping Buffers.

    loading_new_tile

    Pinch zoom on higher zoomlevel

    It rarely drops a frame (multiple zoom actions recorded)

    normal_zooming

    Pinch zoom on lower zoomlevel

    It drops frames more often (multiple zoom actions recorded)

    normal_zooming_higher_level

    Pinch zooming slowly for some time

    When zooming slowly, I noticed stuttering in the ui, the profiler shows the same.

    pinch_zoom_out_slowely

    Rotate slowly on same zoom level

    When rotating slowly, I noticed stuttering in the ui, the profiler shows the same.

    rotate_same_zoom_level

  6. ljbade commented on Sep 28, 2015

    @ljbade
    ContributorAuthor

    Nice work @tobrun that matches the observations I had made.

    Sounds like we need to look at optimising higher zoom levels.

    @kkaefer Do you have any thoughts on what we could improve?

  7. ljbade commented on Sep 28, 2015

    @ljbade
    ContributorAuthor

    @tobrun Do you know much about the GPU tools built into Android Studio? I recall 1.3 or 1.4 improved these.

  8. tobrun commented on Sep 28, 2015

    @tobrun
    Member

    It is actually the same thing as in the screenshot, only visualised in the IDE.
    You can enable it by:

    Settings > Developer options > Profile GPU rendering:

    • in adb shell dumpsys gfxinfo

    Normally you should see it visualise in the IDE under:
    Android Monitor > CPU | GPU tab > GPU tab

    I initally wanted to try out this feature but couldn't get it to work.
    I used the other option in Profile GPU rendering instead.

  9. ljbade commented on Sep 29, 2015

    @ljbade
    ContributorAuthor

    I tested this today. You can very easily see when we get the hitches. Now we need to work out what is causing them.

  10. added this to the android-v2.1.0 milestone on Oct 2, 2015
  11. 3 remaining items

  12. added 2 commits that reference this issue on Oct 19, 2015
    0315514
    d592242
  13. self-assigned this
    on Oct 19, 2015
  14. added 6 commits that reference this issue on Oct 20, 2015
    97d193b
    bc85f93
    8b79a8d
  15. added a commit that references this issue on Nov 6, 2015
    f64079a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Androidperformance

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions