deptofdefense / AndroidTacticalAssaultKit-CIV

Other
918 stars 329 forks source link

Breadcrumbs cause map screen to lag #198

Open matt-msi opened 2 years ago

matt-msi commented 2 years ago

Our QA team noticed in ATAK-Civ 4.4 and 4.5 if the self marker has breadcrumbs enabled, it causes noticeable performance degradation when panning around in the map. This issue did not exist in 4.3.0.0 where the map is performant even with breadcrumbs enabled.

Any ideas? Is it possible automated DTED download (or other 4.4 change) is slowing down the app? We noticed in logcat the application seems to scan for new DTED files quite frequently. There are ways in Android to be notified when files are created/deleted/updated without polling, e.g. using FileObserver.

Steps:

  1. Tap self marker, then toggle breadcrumb tracking "on" in radial menu
  2. Move around to create some crumbs
  3. Drag finger around in the map. Observe screen is laggy.
  4. Tap self marker, toggle breadcrumbs "off".
  5. Drag finger around in the map. Observe screen lag is gone.

ATAK v4.5.1.12 (45dc330d)[playstore].1647912303 Device: SM-T290, Android build: 30

https://user-images.githubusercontent.com/84031230/160681646-22683659-ce18-4cc9-beae-c7ef20171a3b.mov

bisgroves commented 2 years ago

So one way to verify if you assumption is right or wrong - go into the elevation preferences and turn off automatic elevation downloading. Based on the time I have put into it so far (very little) - it seems to be related to the rendering and not the file system. I would be interested in seeing a snippet of your logcat.

matt-msi commented 2 years ago

Tested with "stream elevation data" preference turned off with negative results, hypothesis was incorrect. Lag seems to be directly proportional to number of breadcrumbs rendered. In order to keep the map responsive on our hardware will probably go with a lower value for max breadcrumbs and higher value for crumb distance.