Sunday, December 7, 2008

Tips and Tricks of Dotnet - III

This is the third in sequence, refer to the below link for earlier Tips and Tricks of Dotnet


Continued...
Batch updates for Dataset in ado.net 2.0 increased the performance. Earlier DS used to do round trip for each updated row in dataset. From ado.net 2.0 onwards, datatables also have serialization.


Avoid openxml method on large xml documents, this method tries to open in DOM model, if the document is large it will use memory and resources.


Use XMLTextreader for large documents.


Security in Dotnet:


Refer to the ASP.NET security diagram below.





ASP.NET security settings are by default stored in web.config or machine.config.


In IIS message digest authentication password is sent in MD5 encryption key and value is mapped with password list stored on server. This is better than IIS basic authentication. For any of these two options it is suggested to use SSL, though it slows down the performance.
Check the below IIS authentication comparison table. Dont confuse them with ASP.net security options windows, forms, passport.

These are IIS Security options in general.
Database Tuning:
Higher throughput and lower response time are the criteria of better performance.
Response time = service time + wait time
Throughput = Amount of work / Amount of Time
DataWarehouse projects response time is more important
OLTP projects thoughput (concurrency) is more important.
Aggregate functinos in DB are performance blocks, if there are high number of rows or unidexed data.
DataWarehouse projects response time is more importantOLTP projects thoughput (concurrency) is more important.

If there are more insert, update and delete then throughput need to be considered, if there are more select then response time need to be measured.

No comments:

Post a Comment

 
web counter
Download a free hit counter here.