0

I need to perform a metric measurement on the speed of serialization vs parcelable in Android. I have a very large POJO object that gson converts to JSON and vice versa.

But my superiors would like a metric to determine if converting our serializable classes to parcelable android classes is worth the effort. They dont want to hear community based opinions. What are the best tools i can use to measure the timing ? What do you think about using Android's traceview ?

j2emanue
  • 60,549
  • 65
  • 286
  • 456
  • First google result for 'parceable vs serializable android' http://www.developerphil.com/parcelable-vs-serializable/ – Laurentiu L. Aug 19 '15 at 15:07

1 Answers1

0

don't need to do perf test, serialisation uses reflection and parcelable not. This means more your object is big, more it will take time to reflect it.

fab
  • 790
  • 6
  • 10
  • i surely agree with you but my company is asking for a metric. – j2emanue Aug 19 '15 at 18:38
  • Serialization actually doesn't need to use reflection. It's capable of doing the same manual non-reflection process that Parcelable does, which means it's capable of being just as fast. https://bitbucket.org/afrishman/androidserializationtest – David Liu Sep 23 '15 at 02:30