Results 1 to 2 of 2

Thread: Performance

  1. #1
    ChrisMMN Guest

    Default Performance

    I have a login system on my site that stores information in encrypted cookies. I previously had an include file that unencrypted the cookies for every page that needed them, but recently switched to storing them in Session variables so I would only decrypt the cookies once, but access the session variable instead. What is the performance difference (for Server) from having to read cookies vs read session variables?

  2. #2
    SPG Guest

    Default RE: Performance

    Slightly in favor of 1 cookie; probably in favor of session variables after that -- I expect.<BR><BR>This is because a session is nothing more than a cookie with a really wierd number on it which the server can use to find active information. Hence, if I just ask for a "Name" cookie, it&#039s going to be faster than asking for the "Session" cookie to look up the "Name" value. However, if go on to ask for the "Profession" cookie, I -expect- it will be slower than going on to ask for the "Profession" value, as ASP should already have the "Session" cookie cached.<BR><BR>In terms of memory use et all, cookies are nicer because you don&#039t care about them until they show up with a request. On the other hand, the server has to keep track of anything you put in session variables until the session is terminated (generally 20 minutes after the last request). If you&#039re expecting a lot of traffic, this may make a difference. But hopefully you know all of that already.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts