Re: Saving DataTable to session vs saving a Custom object.

From: John Wood (spam_at_isannoying.com)
Date: 12/12/04


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.
>
>


Relevant Pages

  • Re: Saving DataTable to session vs saving a Custom object.
    ... > Hello John, ... > Large objects in session dont scale very well... ... >> a DataTable to session vs saving a custom object of the same data. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Saving DataTable to session vs saving a Custom object.
    ... Large objects in session dont scale very well... ... > a DataTable to session vs saving a custom object of the same data. ... how much extra cost is involved in saving that ...
    (microsoft.public.dotnet.framework.aspnet)
  • Saving DataTable to session vs saving a Custom object.
    ... DataTable to session vs saving a custom object of the same data. ... had 10 columns, how much extra cost is involved in saving that vs, a custom ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Troubleshooting ASP.Net memory usage issues?
    ... Dave Bush ... Troubleshooting ASP.Net memory usage issues? ... I would start by looking at the Session and/or Application ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: ASP.NET High memory usage
    ... As for the memory consumpting issue you mentioned, I think the Session ... applicaiton's memory usage, you can use the application sever's performance ... How can we measure the total session memory consumption for a worker ...
    (microsoft.public.dotnet.framework.performance)