Click here to Skip to main content
16,010,918 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionSearchengines and unhappy URL's Pin
matthias s.22-Apr-06 0:24
matthias s.22-Apr-06 0:24 
AnswerRe: Searchengines and unhappy URL's Pin
Mike Ellison22-Apr-06 2:47
Mike Ellison22-Apr-06 2:47 
QuestionFolders Pin
kirthikirthi21-Apr-06 22:00
kirthikirthi21-Apr-06 22:00 
GeneralRe: Folders Pin
Guffa21-Apr-06 22:31
Guffa21-Apr-06 22:31 
GeneralRe: Folders Pin
kirthikirthi21-Apr-06 22:39
kirthikirthi21-Apr-06 22:39 
GeneralRe: Folders Pin
RichardGrimmer22-Apr-06 22:28
RichardGrimmer22-Apr-06 22:28 
QuestionWeb Farm Advice Pin
Tad McClellan21-Apr-06 19:17
professionalTad McClellan21-Apr-06 19:17 
AnswerRe: Web Farm Advice Pin
Eric Goedhart22-Apr-06 4:40
professionalEric Goedhart22-Apr-06 4:40 
Hi,


In C#.Net 2003 under Web Farms Best Practices, recomendations and Caveats it says the following: (if you want a copy of the eight pages or so let me know)
------------------------------------------------------------------------------
As was mentioned earlier in the chapter, ViewState can add a considerable amount of overhead to a page. It can take a relatively long period of time to decrypt and verify the ViewState form variable. In addition, depending on how much information is stored in ViewState, it can actually increase the downloadtime of a webpage. On many projects pages store a complete DataGrid control in the ViewState. For large results, the ViewState form variable can actually consume several hundred kilobytes of space, sometimes reaching over 1 MB of size. On a LAN, you might not complain too much about that, but over a slow or weak internet connection, users will certainly notice that pages ttaking to long to load and render.

It's recommended that you disable ViewState unless you are sure that you absolutely need the features it's provides. In fact you should probably disable ViewState throughout your entire web site as a rule, and turn it on only when you have discovered that no alternative will work. Programmers often store data in ViewState to avoid requerying that same data on subsequent loads of that page. Get out your stopwatch and measure it. Which take longer? processing the download and upload of ViewState, or querying the database on the back-end? before you quickly turn to ViewState as a catch-all to make things easier, examine your options regarding your database and server-side caching to see wheher you can avoid using it.

If you are using out-of-process session state, you need to be aware of the crucial fact: Out-of-process session state perform two tasks that are both considered performance issues. The first task is that it makes a network connection to a server somewhere.
Although it might be a fast connection, any off-machine connection will alway's be slower than a in-process data operation. The second task, all out-of-process state management, is acomplished via serialisation. The more complex an object is, the larger its serialized representation and the longer it takes to serialize and deserialize on the network stream. In particular, DataSets (prior to .Net 2.0) serialize into extremely large XML representations that can potentially cause severe delays in state management. Also keep in mind that connections are made to the session state provider at both the beginning and the end of page redering, so any large object that you have in session state can potentially slow down the pipeline twice per page view.

It has been mentioned before, but it's worth mentioning again: Any object that is stored in out-of-process session state has to be serialized. You must be able to restore the state from a serialized graph for that object to work properly with session state. Keep the data you store in the session small and simple. Sticking to the base.Net Framework types will make things a lot easier (and faster).

Application State is an area that can easily be abused. Because the state data stored in the AppDomain object is Globaly scoped throughout the AppDomain, any large data there is a burden on the garbage collector. Large data will stay in memory for an extremely long time, even if you don't use it. Keep your use of this dictionary (many consider it a crutch to be avoided) to a minimum. If you have to use it, store primitive types or small classes that are easily (and quickly) serialized (no DataSets).

If you truly need shared application state. resist the urge to do something cool and fancy and rig up some kind of Remoting System. Something like that wil probably generate a lot of devellopment work and maintenance headache, when you probably could have used a table in your application's database for application state information. Granted, there are situations in which Remoting or using web services to synchronise application data within a farm is necessary, but that situations are rare and usally not practical
------------------------------------------------------------------------------
Smile | :)



With friendly greetings,

Eric Goedhart

Skype: eric-goedhart

Deep in the fundamental heart of mind and Universe there is a reason.

-Slartibartfast
QuestionRow Number in GridView? Pin
Mark Tutt21-Apr-06 17:25
Mark Tutt21-Apr-06 17:25 
AnswerRe: Row Number in GridView? Pin
minhpc_bk21-Apr-06 17:40
minhpc_bk21-Apr-06 17:40 
GeneralRe: Row Number in GridView? Pin
RichardGrimmer22-Apr-06 22:31
RichardGrimmer22-Apr-06 22:31 
GeneralRe: Row Number in GridView? Pin
minhpc_bk23-Apr-06 2:31
minhpc_bk23-Apr-06 2:31 
Questionafter login always go default page Pin
LovelyHelp21-Apr-06 16:56
LovelyHelp21-Apr-06 16:56 
AnswerRe: after login always go default page Pin
minhpc_bk21-Apr-06 17:46
minhpc_bk21-Apr-06 17:46 
QuestionNeed help with ActivePDF Toolkit and ASP.NET 2.0 - having problem opening PDF on the production server! Pin
Slow Learner21-Apr-06 16:44
Slow Learner21-Apr-06 16:44 
AnswerRe: Need help with ActivePDF Toolkit and ASP.NET 2.0 - having problem opening PDF on the production server! Pin
minhpc_bk21-Apr-06 17:53
minhpc_bk21-Apr-06 17:53 
QuestionAdvertisment Banner Pin
LovelyHelp21-Apr-06 16:17
LovelyHelp21-Apr-06 16:17 
AnswerRe: Advertisment Banner Pin
CWIZO22-Apr-06 0:31
CWIZO22-Apr-06 0:31 
AnswerRe: Advertisment Banner Pin
Roshan P Mohammed22-Apr-06 18:47
Roshan P Mohammed22-Apr-06 18:47 
QuestionDatabase for Country, State and City Pin
DotNetDominator21-Apr-06 10:40
DotNetDominator21-Apr-06 10:40 
AnswerRe: Database for Country, State and City Pin
Mike Ellison21-Apr-06 12:47
Mike Ellison21-Apr-06 12:47 
QuestionFull Text Search Engine Pin
RizShiney21-Apr-06 9:10
RizShiney21-Apr-06 9:10 
AnswerRe: Full Text Search Engine Pin
What's my name?21-Apr-06 16:31
What's my name?21-Apr-06 16:31 
QuestionSharing ViewState data between controls Pin
ake_krakbar21-Apr-06 4:28
ake_krakbar21-Apr-06 4:28 
AnswerRe: Sharing ViewState data between controls Pin
Guffa21-Apr-06 5:31
Guffa21-Apr-06 5:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.