You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
When looking into the Android CI tests being flaky in #6546. I was able to pinpoint that a map at zoomlevel 0 keeps using CPU resources and allocating memory while it should be in an idle state (as it is with other zoomlevels).
Analysis
App startup, not showing a map:
Open screen with a map at zoom 0:
Double tap the map to go to zoom 1:
Impact on CI Espresso tests
The Android espresso testing framework is smart enough to wait until the app under test becomes idle (waits for message qeue to be empty and threads to halt). When the test app is idle, it will check if our map has been correctly loaded and notifies that the tests can run.
I noticed that tests showing zoomlevel 0, never start. It seems the app never returns to an idle state. When this occurs, the application stays open for 45 seconds until it espresso times out. Strange behaviour here is if I double tap while the application is timing out the tests will run.
Tried looking into what is happening that keeps the CPU active using a 10 second trace:
When you zoom into one spike:
You can see the following pattern: MessageQueue.next(), a couple of intermediate methods that results into the actual View.draw call. I normal cases we shouldn't be able to see anything here, for example here is a trace at zoom 1 for 10 seconds:
Been adding some log statements to the core code to see what is triggering the invalidations and noticed that the following in Map::Impl::render is called constantly:
Activity
tobrun commentedon Oct 12, 2016
Tried looking into what is happening that keeps the CPU active using a 10 second trace:
When you zoom into one spike:
You can see the following pattern: MessageQueue.next(), a couple of intermediate methods that results into the actual View.draw call. I normal cases we shouldn't be able to see anything here, for example here is a trace at zoom 1 for 10 seconds:
tobrun commentedon Oct 18, 2016
Been adding some log statements to the core code to see what is triggering the invalidations and noticed that the following in
Map::Impl::renderis called constantly:When starting a map not from default position, this is only called once.
tobrun commentedon Oct 19, 2016
Proposed solution in #6747
kkaefer commentedon Nov 10, 2016
Fixed in #6979