473,396 Members | 2,018 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

One large, or multiple small session variables

I'm still thinking about session variables :-)

Does anyone know the detail of how session variables are actually stored?
The question I'm trying to answer is:

Is it more efficient to store and retrieve multiple short strings :

a) in multiple small session variables
b) concatenated and stored as one large session variable
c) inserted into an array and stored in a session variable
d) it's all the same. Who cares?

Keeping in mind that for this application each piece of data will be
retrieved for every page.

I've read that storing a dictionary object in a session variable is bad
ews - something to do with ending up with thread in your apartment, or
something ;-)

What I'd really like to do is create an XML object and store that in a
session variable, but I'm guessing that would be pretty inefficient unless
it had quite a lot of data in it.

Any thoughts on the above appreciated.

Drew
Jul 19 '05 #1
1 1994
"DrewM" <bo***@doesntexist.com> wrote in message
news:el**************@tk2msftngp13.phx.gbl...
a) in multiple small session variables
b) concatenated and stored as one large session variable
c) inserted into an array and stored in a session variable
d) it's all the same. Who cares?
I lean towards "D", however you should keep that amount stored as
small as you can in any method. Remember that it creates a copy of the
data for every session and the session may hang around for 20 minutes
after the person left the site. So you can eat up a lot of memory.

You could use Application Variables and would then only have one copy
of the data, however every user gets the same values which may not be
what you want.
I've read that storing a dictionary object in a session variable is bad ews - something to do with ending up with thread in your apartment, or something ;-)


Yes, the thread in the apartment issue is bad, especially with small
animals around :-], but seriously,..yes you do not want to do that.
--

Phillip Windell [CCNA, MVP, MCP]
pw******@wandtv.com
WAND-TV (ABC Affiliate)
www.wandtv.com
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: jing_li | last post by:
Hi, you all, I am a newbee for php and I need your help. One of my coworker and I are both developing a webpage for our project using php. We have a copy of the same files in different location...
11
by: Ohaya | last post by:
Hi, I'm trying to understand a situation where ASP seems to be "blocking" of "queuing" requests. This is on a Win2K Advanced Server, with IIS5. I've seen some posts (e.g.,...
12
by: zig | last post by:
I've posted this on alt.comp.lang.coldfusion, but is predominantly a javascript problem: I have a CF query which returns several rows of records. I wanted to have a checkbox on each record of...
4
by: Rob Conner | last post by:
No you don't need to know Zope to help me. The whole reason I'd even want to do this is because of Zope though. I made a Zope product, and now want to perfect it. some simple example code... ...
1
by: Andy Fish | last post by:
Hi, I am about to commence the design of what will turn out to be a fairly large asp.net web app, and I am looking for any good advice and resources (books, web pages) concerning how best to...
3
by: Yul | last post by:
Hi, We are in the process of designing an ASP.NET app, where a user will enter some 'Customer ID' to be queried in the database. If the ID is valid, several stored procedures will be called to...
10
by: Conformix Sales | last post by:
Any thought about how can I stop a user from logging into the application multiple times. I am using forms authentication.
2
by: macyp | last post by:
I have to pass values from one aspx page to another. The controls I have in the first page are: a textbox, 3 drop down lists, and 2 check boxes, and a submit button. It is a search page, and the...
3
by: Carl Johansen | last post by:
I have a big ASP website (used by several thousand car dealers) that is a collection of lots of small and medium-sized applications. Now I want to start adding ASP.NET applications to it. I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.