This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
Location animators memory and CPU optimizations - #13678
Merged
Merged
Conversation
LukasPaczos
force-pushed
the
lp-animators-battery-optimization
branch
2 times, most recently
from
January 29, 2019 13:11
d782697 to
60dbe0c
Compare
LukasPaczos
force-pushed
the
lp-animators-battery-optimization
branch
from
January 29, 2019 14:11
0a5cd7c to
6b5b350
Compare
Contributor
Author
tobrun
reviewed
Jan 30, 2019
tobrun
left a comment
Member
There was a problem hiding this comment.
looks good! one small comment and looping @danesfeder in for additional 👀
…ion rate throttle option
LukasPaczos
force-pushed
the
lp-animators-battery-optimization
branch
from
January 30, 2019 12:55
6b5b350 to
3e5e4ed
Compare
tobrun
approved these changes
Jan 30, 2019
LukasPaczos
force-pushed
the
lp-animators-battery-optimization
branch
from
January 30, 2019 14:18
3e5e4ed to
246dbbe
Compare
danesfeder
approved these changes
Jan 30, 2019
danesfeder
left a comment
Contributor
There was a problem hiding this comment.
@LukasPaczos awesome work here - excited to utilize these optimization in the navigation SDK ✅
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR adds an option to decrease the output rate of animated fractions for location camera's and puck's
LatLngand bearing values and since on higher zoom levels those values do not need to be precise to still render visually correct, without animation "stuttering". Keeping the animation rate low decreases the CPU's utilization, which should directly impact energy consumption.Below are before and after screenshots of average CPU utilization while animating a navigation puck on zoom level
15and tilt45which are typical navigation settings for driving around town.Testing shows a CPU utilization on a Pixel 2 XL down about 11 percentage points on average - this is ~34% less CPU stress caused by our map and animations.
The higher we go with a zoom level the more we can throttle the animations. On zoom levels around 13, I could go down to as low as average 12% CPU utilization without impacting the UX.
In pair with decreasing the animation rate, this PR refactors the animator coordinator to only animate values that are going to be consumed - for example, camera bearing animator is not going to run if the
CameraModeis set toTRACKINGonly.Example usage:
TODO:
OnRenderModeChangedlistener