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

Application[] and Session[]

Hi,

How slowly is to work with these objects - Application[] and Session[] ? Is
it much better to create a huge project or some static library and place all
variables/constants there instead of many Session[] objects?

When I removed some of Session[] objects and replaced by another approaches
I got an illusion that application started working significantly faster? Is
it true?

Did anybody try to evaluate how slow are these objects?

Thanks,
Dmitri

Nov 18 '05 #1
6 1249

"Just D" <no@spam.please> wrote in message news:mCuCc.2229$CR3.1510@lakeread03...
Hi,

How slowly is to work with these objects - Application[] and Session[] ? Is
it much better to create a huge project or some static library and place all
variables/constants there instead of many Session[] objects?

When I removed some of Session[] objects and replaced by another approaches
I got an illusion that application started working significantly faster? Is
it true?

Did anybody try to evaluate how slow are these objects?

Thanks,
Dmitri


What are you storing? Lots of int's for example? Then you get
lots of boxing/unboxing operations. In this case it might be better
to define a class to store a number of int's (that are "natural" to
store together), so ytou can store a reference to that single class.

You can't easily change Session into static variables: Session is
user-specific (or rather "session specific" :-) ), and "static" is
application-wide.

Hans Kesting
Nov 18 '05 #2
Hi Hans,

Thank you, I understand why do I need Session[] and Application[]. The
problem is that I'm currently optimizing the application that has been
written before me and later with my participation. The first author used a
lot of variables for everything and I'm trying to move some constants to a
static class and all session-related objects and variables to a huge object,
stored into session[] instead of a few hundreds of Session[] objects. It
makes sense, but I was wondering if anybody tested how slowly is to use
Session[] comparing to other methods, including a separate Class Library
with static members. Just it.

Thanks,
Dmitri

"Hans Kesting"
How slowly is to work with these objects - Application[] and Session[] ?
Is
it much better to create a huge project or some static library and place
all
variables/constants there instead of many Session[] objects?

When I removed some of Session[] objects and replaced by another
approaches
I got an illusion that application started working significantly faster?
Is
it true?

Did anybody try to evaluate how slow are these objects?
What are you storing? Lots of int's for example? Then you get
lots of boxing/unboxing operations. In this case it might be better
to define a class to store a number of int's (that are "natural" to
store together), so ytou can store a reference to that single class.

You can't easily change Session into static variables: Session is
user-specific (or rather "session specific" :-) ), and "static" is
application-wide.


Nov 18 '05 #3
Could you not move the constants to a resource file then load them into a
static class at application start up. Or create a cache source with a
dependency set to an xml file holding your constants?

MattC
"Just D" <no@spam.please> wrote in message
news:aDwCc.2233$CR3.1346@lakeread03...
Hi Hans,

Thank you, I understand why do I need Session[] and Application[]. The
problem is that I'm currently optimizing the application that has been
written before me and later with my participation. The first author used a
lot of variables for everything and I'm trying to move some constants to a
static class and all session-related objects and variables to a huge object, stored into session[] instead of a few hundreds of Session[] objects. It
makes sense, but I was wondering if anybody tested how slowly is to use
Session[] comparing to other methods, including a separate Class Library
with static members. Just it.

Thanks,
Dmitri

"Hans Kesting"
How slowly is to work with these objects - Application[] and Session[] ? Is
it much better to create a huge project or some static library and place all
variables/constants there instead of many Session[] objects?

When I removed some of Session[] objects and replaced by another
approaches
I got an illusion that application started working significantly faster? Is
it true?

Did anybody try to evaluate how slow are these objects?

What are you storing? Lots of int's for example? Then you get
lots of boxing/unboxing operations. In this case it might be better
to define a class to store a number of int's (that are "natural" to
store together), so ytou can store a reference to that single class.

You can't easily change Session into static variables: Session is
user-specific (or rather "session specific" :-) ), and "static" is
application-wide.

Nov 18 '05 #4
Hi Dimitri:

It's a relative answer that depends on how many objects, the type of
the objects, and where you keep session state (in memory, shared
server, or SQL Server). The Application object can easily be avoided,
Session is not so easy. Do some refactoring and then test to see if
your performance has improved.

I have some other thoughts typed up in these articles:

http://www.odetocode.com/Articles/83.aspx
http://odetocode.com/Articles/89.aspx

HTH!

--
Scott
http://www.OdeToCode.com
On Wed, 23 Jun 2004 23:35:06 -0700, "Just D" <no@spam.please> wrote:
Hi,

How slowly is to work with these objects - Application[] and Session[] ? Is
it much better to create a huge project or some static library and place all
variables/constants there instead of many Session[] objects?

When I removed some of Session[] objects and replaced by another approaches
I got an illusion that application started working significantly faster? Is
it true?

Did anybody try to evaluate how slow are these objects?

Thanks,
Dmitri


Nov 18 '05 #5
"Just D" <no@spam.please> wrote in message
news:mCuCc.2229$CR3.1510@lakeread03...
Hi,

How slowly is to work with these objects - Application[] and Session[] ? Is it much better to create a huge project or some static library and place all variables/constants there instead of many Session[] objects?

When I removed some of Session[] objects and replaced by another approaches I got an illusion that application started working significantly faster? Is it true?

Did anybody try to evaluate how slow are these objects?


How many such variables will you be using?

The performance is probably not worth worrying about. My philosophy is to
get the code to work first, then to worry about performance. Of course, this
assumes I don't do something brain-dead to make the performance so bad that
QA refuses to test it!

Also, pay no attention to performance the first time the application starts
after you change the application or web.config. When the application first
starts, everything gets recompiled. You should check performance by running
the same test multiple times and averaging the performance.

--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #6
"Just D" <no@spam.please> wrote in message
news:mCuCc.2229$CR3.1510@lakeread03...
Hi,

How slowly is to work with these objects - Application[] and Session[] ? Is it much better to create a huge project or some static library and place all variables/constants there instead of many Session[] objects?

When I removed some of Session[] objects and replaced by another approaches I got an illusion that application started working significantly faster? Is it true?

Did anybody try to evaluate how slow are these objects?


How many such variables will you be using?

The performance is probably not worth worrying about. My philosophy is to
get the code to work first, then to worry about performance. Of course, this
assumes I don't do something brain-dead to make the performance so bad that
QA refuses to test it!

Also, pay no attention to performance the first time the application starts
after you change the application or web.config. When the application first
starts, everything gets recompiled. You should check performance by running
the same test multiple times and averaging the performance.

--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #7

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

Similar topics

9
by: William LaMartin | last post by:
I have a problem, mentioned here before, of Session and Application variables disappearing at one site but not at others or on my development computer. The problem is illustrated by an example...
7
by: Pavils Jurjans | last post by:
Hello, I wanted to get some light in the subject. As I develop ASP.NET applications, it's necessary to understand how exactly the server- communication happens. It seems like initially...
1
by: Pavils Jurjans | last post by:
Hello, I have a couple of unclear questions about ASP.NET sessions: First, I'd like to have some way to see how many sessions currently are running on the certain application, and, possibly, have...
10
by: Steve Taylor | last post by:
I am having trouble understanding the ASP.NET application boundaries. Here's my setup: 1. Win2003 Server with IIS 6 and an application defined at the root "SalesNow" (www.salesnow.com). 2. A...
2
by: Lars Netzel | last post by:
Hi We have an ASP.NET application running on a Live server and we have had some problems with the Application pool beeing recycled due to heavy load on the server. The load is really not that...
6
by: Chase | last post by:
I'm pretty new to asp.net and am having problems with my application timing out. I've written an application that loops through all of the information on an excel spreadsheet and does certain...
7
by: Victor | last post by:
I've got two domain names sharing the same IP address that use ASP VBScript If I set a session variable with domain 1, it is only available for domain 1 - this is correct? If I set an...
3
by: illegal.prime | last post by:
Hi all, I have a service that needs to start a regular windows application. I'm running the service as ServiceAccount.LocalSystem. But, when it starts the process (using Process.Start) the GUI...
4
by: Alex | last post by:
Hello, This is a follow-up to my earlier post about having issues with our application pool recycling. We currently use Session State InProc, but if I were to choose to move the existing...
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
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.