Is using Serializable in Android bad?

For in-memory use, Parcelable is far, far better than Serializable. I strongly recommend not using Serializable.

You can’t use Parcelable for data that will be stored on disk (because it doesn’t have good guarantees about data consistency when things change), however Serializable is slow enough that I would strongly urge not using it there either. You are better off writing the data yourself.

Also, one of the performance issues with Serializable is that it ends to spin through lots of temporary objects, causing lots of GC activity in your app. It’s pretty heinous. :}

Leave a Comment