Saving DataTable to session vs saving a Custom object.

Discussion in 'ASP .Net' started by John Kandell, Dec 7, 2004.

  1. John Kandell

    John Kandell Guest

    Hi,

    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.

    John
     
    John Kandell, Dec 7, 2004
    #1
    1. Advertising

  2. John Kandell

    Matt Berther Guest

    Hello John,

    Does it have to be saved in Session? Is the data unique per user? Or would
    HttpContext.Application or HttpContext.Cache be a better spot for it?

    Large objects in session dont scale very well...

    --
    Matt Berther
    http://www.mattberther.com

    > Hi,
    >
    > 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.
    >
    > John
    >
     
    Matt Berther, Dec 7, 2004
    #2
    1. Advertising

  3. John Kandell

    John Kandell Guest

    Hi

    The data is unique per user.
    And we are using SQL server as storage.

    Also, the requirement is to keep the HTML as small as possible, so, we can't
    use ViewState either.

    John



    "Matt Berther" <> wrote in message
    news:...
    > Hello John,
    >
    > Does it have to be saved in Session? Is the data unique per user? Or would
    > HttpContext.Application or HttpContext.Cache be a better spot for it?
    >
    > Large objects in session dont scale very well...
    >
    > --
    > Matt Berther
    > http://www.mattberther.com
    >
    > > Hi,
    > >
    > > 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.
    > >
    > > John
    > >

    >
    >
     
    John Kandell, Dec 7, 2004
    #3
  4. John Kandell

    John Kandell Guest

    Just to be clear..., I meant we are using SQL server as storage for session
    variables.

    Rahul


    "John Kandell" <> wrote in message
    news:jo9td.12941$l%...
    > Hi
    >
    > The data is unique per user.
    > And we are using SQL server as storage.
    >
    > Also, the requirement is to keep the HTML as small as possible, so, we

    can't
    > use ViewState either.
    >
    > John
    >
    >
    >
    > "Matt Berther" <> wrote in message
    > news:...
    > > Hello John,
    > >
    > > Does it have to be saved in Session? Is the data unique per user? Or

    would
    > > HttpContext.Application or HttpContext.Cache be a better spot for it?
    > >
    > > Large objects in session dont scale very well...
    > >
    > > --
    > > Matt Berther
    > > http://www.mattberther.com
    > >
    > > > Hi,
    > > >
    > > > 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.
    > > >
    > > > John
    > > >

    > >
    > >

    >
    >
     
    John Kandell, Dec 7, 2004
    #4
  5. John Kandell

    eeebop Guest

    I don't have an answer for you, but if you've found something, I'd be
    curious to know.

    Thanks!


    John Kandell wrote:
    > Hi,
    >
    > 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.
    >
    > John
     
    eeebop, Dec 10, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. J. Babe
    Replies:
    1
    Views:
    8,356
    Kevin Spencer
    Aug 15, 2003
  2. Fredrik Rodin

    Sort a datatable and create a new datatable

    Fredrik Rodin, Feb 16, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    9,059
    paul.mariotti
    Sep 28, 2007
  3. =?Utf-8?B?Qmx1ZWZsb3dlcg==?=

    Casting DataTable to class inherit from DataTable

    =?Utf-8?B?Qmx1ZWZsb3dlcg==?=, Apr 2, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    1,001
    =?Utf-8?B?Qmx1ZWZsb3dlcg==?=
    Apr 2, 2004
  4. jg
    Replies:
    1
    Views:
    730
    =?Utf-8?B?U2hhaWxlc2ggSmFubnU=?=
    Aug 17, 2004
  5. Ersin Gençtürk
    Replies:
    1
    Views:
    3,492
    Ersin Gençtürk
    Oct 6, 2004
Loading...

Share This Page