⬆️ ⬇️

Serializable or Parcelable?

What is better to use?

It is more convenient for me to use the Serializable interface, but in many places it is written that this mechanism works “too slow”.

At the same time, I did not find any tests for comparison.

The clien / server application, possibly with a widget. The amount of data between different parts of the application may be sufficient.

Someone substantively dealt with this issue?

PS

I had to spend a couple / three hours, pick up the minuses, it is not clear why.

To conduct tests and get results - when starting a new Activity with the transfer of 1000 objects with 4 fields, the performance gain is 4 times Parcelable in relation to Serializable.

That is what I asked. But no one could say this to me.


')

Source: https://habr.com/ru/post/173975/



All Articles