Hi guys,
We have a problem with skin attachments.
We have a scene with 6 items (3 of them are animated) and 20 moving soldiers.
Each item has 20 attachements for 10 skins and 4 bones. When soldiers have 15 attachements, one skin and 5 bones.
During idle state in this scene, when no action is performed, that is items stay in their places and soldiers are buzzing around some item(camp), soldiers'
animation starts to stutter and fps reduces from 60 to sometimes 15. We have tracked down the running time of scene's
draw function and found out that it is actually caused by Skin's getAttachment function. We have measured running time
of that function and filtered out the cases when running time is longer than 1000 microseconds. Here is the piece from
our log of fps. As you can see fps is ok and running time of getAttachment function is usually lower that 1000
microseconds, but sometimes it produces such high values as in the log.
Notice: the logs represents fps of our game and running time of getAttachment's function(in microseconds) in Skin class.
06-14 15:09:43.025: I/birdland fps(14724): fps: 61
06-14 15:09:44.025: I/birdland fps(14724): fps: 60
06-14 15:09:45.025: I/birdland fps(14724): fps: 60
06-14 15:09:46.025: I/birdland fps(14724): fps: 60
06-14 15:09:46.884: I/birdland fps(14724): Skin getAttachment: 16357
06-14 15:09:47.025: I/birdland fps(14724): fps: 60
06-14 15:09:48.025: I/birdland fps(14724): fps: 61
06-14 15:09:49.025: I/birdland fps(14724): fps: 60
After several such peeks, it causes fps reduction and animations start to stutter.
06-14 15:11:43.337: I/birdland fps(14724): fps: 61
06-14 15:11:44.548: I/birdland fps(14724): fps: 49
06-14 15:11:45.283: I/birdland fps(14724): Skin getAttachment: 1770
06-14 15:11:45.345: I/birdland fps(14724): Skin getAttachment: 6928
06-14 15:11:45.400: I/birdland fps(14724): fps: 49
06-14 15:11:45.868: I/birdland fps(14724): Skin getAttachment: 33935
06-14 15:11:46.079: I/birdland fps(14724): Skin getAttachment: 5524
06-14 15:11:46.368: I/birdland fps(14724): Skin getAttachment: 1617
06-14 15:11:46.470: I/birdland fps(14724): fps: 41
06-14 15:11:47.001: I/birdland fps(14724): Skin getAttachment: 1434
06-14 15:11:47.493: I/birdland fps(14724): fps: 40
06-14 15:11:48.478: I/birdland fps(14724): fps: 55
06-14 15:11:49.486: I/birdland fps(14724): fps: 61
06-14 15:11:50.501: I/birdland fps(14724): fps: 61
We have also checked the size of attachments ObjectMap in Skin, which does not exceed 32. Any ideas why such peeks occur?
We are using Kindle Fire (2nd generation).