I have a fairly complex OpenGL based app which uses AndroidGameView
for setting up the drawing contexts, etc. I noticed that at some point in the past (it was not always like this) that I started getting constant GC_MINOR
messages in the console when testing the app on a Nexus 7 every second or two.
I also noticed that the basic template project for "Android OpenGL Application" (in Xamarin Studio) also suffers from a similar problem. Creating a brand new project from this template and running it on hardware results in the following messages in the console when the app is just sitting there and running:
[Mono] GC_BRIDGE num-objects 8 num_hash_entries 8 sccs size 8 init 0.00ms df1 0.12ms sort 0.00ms dfs2 0.24ms setup-cb 0.03ms free-data 0.03ms user-cb 26.49ms clenanup 0.12ms links 0/0/0/0 dfs passes 16/8
[Mono] GC_MINOR: (Nursery full) pause 51.85ms, total 52.00ms, bridge 26.98ms promoted 848K major 1120K los 186K
[Mono] GC_MINOR: (Nursery full) pause 49.65ms, total 49.80ms, bridge 0.00ms promoted 544K major 1664K los 186K
[Mono] GC_MINOR: (Nursery full) pause 50.72ms, total 50.93ms, bridge 0.00ms promoted 544K major 2208K los 186K
[Mono] GC_MINOR: (Nursery full) pause 84.78ms, total 85.02ms, bridge 0.00ms promoted 560K major 2768K los 186K
[Mono] GC_MINOR: (Nursery full) pause 58.10ms, total 58.23ms, bridge 0.03ms promoted 560K major 3328K los 186K
[Mono] GC_MINOR: (Nursery full) pause 49.32ms, total 49.47ms, bridge 0.00ms promoted 544K major 3872K los 186K
[Mono] GC_BRIDGE waiting for bridge processing to finish
[Mono] GC_BRIDGE num-objects 1 num_hash_entries 1 sccs size 1 init 0.00ms df1 0.24ms sort 0.03ms dfs2 0.00ms setup-cb 0.00ms free-data 0.03ms user-cb 25.57ms clenanup 0.12ms links 0/0/0/0 dfs passes 18/9
[Mono] GC_MINOR: (Nursery full) pause 135.53ms, total 135.77ms, bridge 25.82ms promoted 560K major 4432K los 186K
My question is: why is this happening? I'm sure it has something to do with the underlying AndroidGameView
but it was not always like this. In my actual app the constant GC'ing is having a negative impact on the overall graphics performance (it seems to "hiccup" quite a bit as the GC_MINOR
pauses for 50-100ms).