Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I/Counters: exceeded sample count in FrameTime log

I recently started to see this logs I/Counters: exceeded sample count in FrameTime multiple times in my app logcat, I understood it comes from Google Maps.

Any idea what it means? and how to get rid of it?

like image 379
Sharas Avatar asked Jul 21 '21 09:07

Sharas


1 Answers

Try disabling a few layers of the widget (like say 'myLocation' layer enabled by using 'myLocationEnabled' parameter) and enable them back in the release build. Also make sure you are disposing your Google Maps Controller in the dispose method (if you are storing it somewhere after taking it from onMapCreated).

As far as I can figure out from the error and the API docs, GoogleMaps has multiple layers and each layer needs to be built in a given FrameTime. Since the added burden of multiple layers slow down the processing, it may exceed given FrameTime and trigger the error.

The reason may also include the fact that debug builds have no optimisations and that really affects the GoogleMaps package. I tried the same app with the constant barrage of 'I/Counters: exceeded sample count in FrameTime' errors in release build on a real device and the errors seem to not appear, implying these errors can simply be ignored.

like image 132
cryo._ Avatar answered Sep 20 '22 14:09

cryo._