I have a HashMap which I would pass to another Activity class. I simply use this code:
HashMap<String, String> mKeyValues = new HashMap<String, String>();
// add some data to hash map
Intent intent = new Intent(MainActivity.this, SubActivity.class);
intent.putExtra(EXTRA_ENTRIES, mKeyValues);
This is possible because a HashMap already implements the Serializeable interface.
The question is now if this is fast enough for a HashMap with 100 Elements or should I better create a data class which implements the Parcelable interface (because Parcelable is much? faster)?
Is there a guideline when the Parceable interface should be used regarding performance and other things?
I found nothing which compares the duration of passing objects implementing Serializeable and objects implementing Parceable to another Activity.
Regards