First time user performance

8 August 2013

Tags

  • Fairy Tale Twist
  • Performance

Bottom line: Animation dominates profile for first time user with a hot cache. With a similar domination for hitting the the menu. Any change here will significantly improve performance over anything else.

Observation:

  • CPU performance is closely tied to number of allocations, i.e. large number of allocations results in high CPU times
  • The number of allocations balloons disproportionately for amount of memory used, e.g. first time user to menu, double the total memory used but allocations was 200X
  • For memory heavy methods the amount of time spent in garbage collection similar to amount of time doing work, e.g. string split 2010ms, garbage collection 3709ms
  • With a 30s load time, 12s is garbage collection.

Recommend:

  • Switch keyframes to structure of arrays instead of arrays of structure, i.e. has an array for each attribute, one element for each keyframe
  • Consider writing our own String.split that doesn’t perform allocations and reuses string/arrays.
  • Do not preload dialogs, maybe consider loading during gameplay

Do not recommend:

  • Would not consider replacing XML parsing with JSON parsing, similar evils.