Re: Saving DataTable to session vs saving a Custom object.
From: John Wood (spam_at_isannoying.com)
Date: 12/12/04
- Next message: John Wood: "Re: Database Access"
- Previous message: Greg Horwood: "Re: Database Access"
- In reply to: John Kandell: "Saving DataTable to session vs saving a Custom object."
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 12 Dec 2004 00:36:15 -0500
I don't think the session you refer to will actually result in any
serialization occurring, so the difference will just be in terms of the
memory usage. The biggest overhead you'd see in memory usage would be the
fact that you could have typed classes containing your data in an ArrayList
and you avoid the boxing overhead. DataRows, while quite optimized for
storing data, do end up boxing the data before it is stored so end up with
an extra object for each column in each row that otherwise wouldn't need to
be allocated.
--
John Wood
Blog: http://spaces.msn.com/members/johnwood/
"John Kandell" <someone@home.now> wrote in message
news:7rLud.86532$l%5.2432619@news20.bellglobal.com...
> Hi,
>
> I posted this in the asp.net group, but didn't get a response. Maybe
someone
> here can help me with this...
>
> ---
>
> Would someone be able to shed some light on what is the cost of saving a
> DataTable to session vs saving a custom object of the same data.
>
> For example, let's say I had a DataTable with 1000 records and each record
> had 10 columns, how much extra cost is involved in saving that vs, a
custom
> object with 10 get/set properties in a ArrayList holding 1000 instances of
> the object with the same data?
>
>
> Looking forward to your response.
>
>
- Next message: John Wood: "Re: Database Access"
- Previous message: Greg Horwood: "Re: Database Access"
- In reply to: John Kandell: "Saving DataTable to session vs saving a Custom object."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|