I have to send data over Http connection after serializing it. I set the data in JSON object that will be sent via Http connection.Is converting the data in JSON object a way to serialize it or I need to have a class which extends Serializable??
On Oct 8, 10:31 pm, hackbod <[EMAIL PROTECTED]> wrote: > Parcelable is much much more efficient than Serializable, but you > should NOT use it for storing data to persistent storage as described > in the Parcel > dochttp://code.google.com/android/reference/android/os/Parcel.html > > Of course how much depends entirely on the objects involved, but a > 100x difference wouldn't be unexpected. > > On Oct 8, 3:18 am, Guillaume Perrot <[EMAIL PROTECTED]> wrote: > > > When passing objects in a Bundle, is a Parcelable more efficient than > > a Serializable ? How much ? > > > On Oct 8, 2:32 am, "Josh Roesslein" <[EMAIL PROTECTED]> wrote: > > > > It might be okay to useserializationin services since they would normally > > > run for a long period. > > > Probably the only thing on the Android that would be long lived. > > > > On Tue, Oct 7, 2008 at 7:26 PM, hackbod <[EMAIL PROTECTED]> wrote: > > > > > On a phone, I would argue there is pretty much no such thing as a long- > > > > lived application. > > > > > The use of a handheld device is just fundamentally different than a > > > > desktop. Even the browser, though you may sometimes spend a lot of > > > > time in it, very often you are quickly popping in and out of it. Add > > > > in all of the interruptions (SMS, e-mail, chats, phone calls, etc) and > > > > the fact that with such a small screen you can only see one app at a > > > > time and with such few resources you can only actually have a few apps > > > > running in the background at a time... and startup time is pretty > > > > important. > > > > > Plus, keep in mind that flipping open the keyboard means destroying > > > > the current activity and starting a new instance of it. As such, you > > > > really really don't want to do slow things in Activity.onCreate() or > > > > anything it depends on, and would very much be best off avoiding > > > >serializationthere. You can somewhat mitigate slow startup times > > > > here by caching data in your process, using the Activity APIs to > > > > transfer state across instances, etc... but best is to just design > > > > your app up-front to have a fast startup time, benefiting many > > > > important interactions the user has with it. > > > > > On Oct 7, 5:11 pm, "Josh Roesslein" <[EMAIL PROTECTED]> wrote: > > > > > For a short lived application startup time would be important. > > > > > But for a long lived application that isn't restarted often it isn't > > > > > as > > > > > important. > > > > > I never likedserializationanyways. There is better and faster ways to > > > > > persist your application's state to disk. > > > > > > On Tue, Oct 7, 2008 at 6:54 PM, hackbod <[EMAIL PROTECTED]> wrote: > > > > > > > Startup is actually one of the most performance critical parts of an > > > > > > application, since it directly impacts how quickly the user can move > > > > > > to your application from somewhere else, and if that takes a > > > > > > noticeable amount of time (you really want to keep it < 1 second) > > > > > > then > > > > > > they are much less likely to use your app. > > > > > > > On Oct 7, 3:33 pm, "Josh Roesslein" <[EMAIL PROTECTED]> wrote: > > > > > > > Yeah I'm not sure how the performance ofserializationis on the > > > > Dalvik > > > > > > VM. > > > > > > > If you are just usingserializationduring startup/shutdown speed > > > > > > shouldn't > > > > > > > matter too much. > > > > > > > But if you are loading/unloading objects a lot during the runtime > > > > > > > of > > > > the > > > > > > > application, it might be a bit sluggish. > > > > > > > > On Tue, Oct 7, 2008 at 5:17 PM, hackbod <[EMAIL PROTECTED]> wrote: > > > > > > > > > It does support it, but I would generally recommend against it > > > > because > > > > > > > > Javaserializationis slooooow. > > > > > > > > > It's hard to address the original question because there are > > > > basically > > > > > > > > no details. > > > > > > > > > On Oct 7, 2:34 pm, "Josh Roesslein" <[EMAIL PROTECTED]> wrote: > > > > > > > > > I believe Android's Java VM fully supports JavaSerialization. > > > > > > > > > Trying Googling for "javaserialization" and you should find > > > > plenty > > > > > > of > > > > > > > > > tutorials > > > > > > > > > to get you started. > > > > > > > > > > On Tue, Oct 7, 2008 at 9:57 AM, Nemat <[EMAIL PROTECTED]> > > > > wrote: > > > > > > > > > > > Hi, > > > > > > > > > > > Can anyone tell me aboutobjectserializationin Android?? > > > > > > > > > > > Thanks in Advance --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

