473,378 Members | 1,209 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,378 software developers and data experts.

Performance Q..

My development environments are ASP.Net and VB.Net and .NetFramework1.1.

I remember reading "using less number of session variables is good for
application performance".

Now instead of using 20 session variables, I can use one session variable
which carries the data for all the 20 variables that I want to keep track.

Is it a good idea? Any documentation on how exactly the sessions variables
are processed and stored in IIS5?

Thanks,

Lalit Singh
Nov 19 '05 #1
2 1288
Performance generally falls into 2 categories: Processor and Memory.
Anything which saves Processor usage or Memory usage improves performance.
If you can remember that, you can stop relying on opinions you read to
determine what you should do.

Session is memory. Anything which reduces Session size will improve
performance. Combining Session variables into a single object isn't likely
to improve performance, as you aren't changing the size of anything, just
how it is stored. If I put 5 apples in a box, I still have 5 apples. I also
have the box now.

Programming instructions are Processor. If, by putting all of these objects
into a single object enables you to write leaner code, you will improve
performance. For example, using the apples again, taking the apples out of
Session one at a time, I need to write 5 sets of instructions, or a loop
that executes 5 times. If I take the box out, I use only 1 instruction. Of
course, at some point you're going to need to take the apples out of the
box. So, that kind of cancels out the savings there.

But let me get back to my original point: Don't rely on opinions. If you're
really concerned about performance, keep your eye on Memory usage and
Processor usage. Don't concentrate on Session. Concentrate on your whole
app. Look for opportunites to write leaner code, and maximize memory usage.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Lalit Singh" <La***********@hotmail.com> wrote in message
news:#H**************@TK2MSFTNGP09.phx.gbl...
My development environments are ASP.Net and VB.Net and .NetFramework1.1.

I remember reading "using less number of session variables is good for
application performance".

Now instead of using 20 session variables, I can use one session variable
which carries the data for all the 20 variables that I want to keep track.

Is it a good idea? Any documentation on how exactly the sessions variables
are processed and stored in IIS5?

Thanks,

Lalit Singh

Nov 19 '05 #2
Thanks,
I was waiting to post during this hour of the day so that you will respond.
Thanks,
Lalit
"Kevin Spencer" <ks******@takempis.com> wrote in message
news:#X**************@TK2MSFTNGP14.phx.gbl...
Performance generally falls into 2 categories: Processor and Memory.
Anything which saves Processor usage or Memory usage improves performance.
If you can remember that, you can stop relying on opinions you read to
determine what you should do.

Session is memory. Anything which reduces Session size will improve
performance. Combining Session variables into a single object isn't likely
to improve performance, as you aren't changing the size of anything, just
how it is stored. If I put 5 apples in a box, I still have 5 apples. I also have the box now.

Programming instructions are Processor. If, by putting all of these objects into a single object enables you to write leaner code, you will improve
performance. For example, using the apples again, taking the apples out of
Session one at a time, I need to write 5 sets of instructions, or a loop
that executes 5 times. If I take the box out, I use only 1 instruction. Of
course, at some point you're going to need to take the apples out of the
box. So, that kind of cancels out the savings there.

But let me get back to my original point: Don't rely on opinions. If you're really concerned about performance, keep your eye on Memory usage and
Processor usage. Don't concentrate on Session. Concentrate on your whole
app. Look for opportunites to write leaner code, and maximize memory usage.
--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Lalit Singh" <La***********@hotmail.com> wrote in message
news:#H**************@TK2MSFTNGP09.phx.gbl...
My development environments are ASP.Net and VB.Net and .NetFramework1.1.

I remember reading "using less number of session variables is good for
application performance".

Now instead of using 20 session variables, I can use one session variable which carries the data for all the 20 variables that I want to keep track.
Is it a good idea? Any documentation on how exactly the sessions variables are processed and stored in IIS5?

Thanks,

Lalit Singh


Nov 19 '05 #3

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

Similar topics

25
by: Brian Patterson | last post by:
I have noticed in the book of words that hasattr works by calling getattr and raising an exception if no such attribute exists. If I need the value in any case, am I better off using getattr...
12
by: Fred | last post by:
Has anyone a link or any information comparing c and c++ as far as execution speed is concerned? Signal Processing algorithms would be welcome... Thanks Fred
12
by: serge | last post by:
I have an SP that is big, huge, 700-800 lines. I am not an expert but I need to figure out every possible way that I can improve the performance speed of this SP. In the next couple of weeks I...
6
by: teedilo | last post by:
We have an application with a SQL Server 2000 back end that is fairly database intensive -- lots of fairly frequent queries, inserts, updates -- the gamut. The application does not make use of...
5
by: Scott | last post by:
I have a customer that had developed an Access97 application to track their business information. The application grew significantly and they used the Upsizing Wizard to move the tables to SQL...
115
by: Mark Shelor | last post by:
I've encountered a troublesome inconsistency in the C-language Perl extension I've written for CPAN (Digest::SHA). The problem involves the use of a static array within a performance-critical...
13
by: bjarne | last post by:
Willy Denoyette wrote; > ... it > was not the intention of StrousTrup to the achieve the level of efficiency > of C when he invented C++, ... Ahmmm. It was my aim to match the performance...
13
by: Bern McCarty | last post by:
I have run an experiment to try to learn some things about floating point performance in managed C++. I am using Visual Studio 2003. I was hoping to get a feel for whether or not it would make...
7
by: Michael D. Ober | last post by:
When calling Enqueue, the internal array may need to be reallocated. My question is by how much? In the old MFC array classes, you could tell MFC how many additional elements to add to the array...
1
by: jvn | last post by:
I am experiencing a particular problem with performance counters. I have created a set of classes, that uses System.Diagnostics.PerformanceCounter to increment custom performance counters (using...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.