Is it more efficient to pass large parcelable or pass id and query db?

前端 未结 1 1042
走了就别回头了
走了就别回头了 2021-01-16 15:40

Just like it says on the tin. I have a decent sized object, consisting of about 20 variables, some of which are themselves android objects (Calendar, Uri). An arbitrary numb

相关标签:
1条回答
  • 2021-01-16 16:32

    If the object in question is small (under 1MB), then going the Parcelable route should be more efficient. Basically, you avoid the disk I/O (and the accompanying complexity of trying to do that on a background thread when triggered by a broadcast).

    0 讨论(0)
提交回复
热议问题