Does an Intent's extras still get flattened into a Parcel even if the new activity is being started
Posted
by Neil Traft
on Stack Overflow
See other posts from Stack Overflow
or by Neil Traft
Published on 2010-03-17T16:18:10Z
Indexed on
2010/03/17
16:21 UTC
Read the original article
Hit count: 300
I was wondering...
So if you start a new activity via an intent, the intent has to be serialized and deserialized because you may have to send the intent to a separate VM instance via IPC. But what if the PackageManager knows that your new activity will be created on the current task? It seems like a reasonably Googly optimization would be not to serialize the intent at all, since it's all happening inside the same VM. But then again, you can't just allow the new activity to use the same instance of each parcelable, because any changes made by the new activity would show up in the old activity and the programmer might not be expecting this.
So, is this optimization being done? Or do the extras always get marshalled and unmarshalled, no matter what?
© Stack Overflow or respective owner