SlideShare a Scribd company logo
1 of 13
Download to read offline
o improve the performance of an ASP.Net application you need to
optimize your front-end UI (user interface) code as well as the back-
end database. You can also think of the following tips as a brief best
practices guide for the ASP.net performance optimization.
http://www.hartmannsoftware.com/
T
Use Stored Procedures. A Stored Procedure has an execution plan hence it
always performs faster than T-SQL. Logic separation, Low network bandwidth
consumption, improved data security and integrity are some of the added
benefits of using a stored procedure.
http://www.hartmannsoftware.com/
Write efficient queries. A few tips:
• If needed, de-normalize your database design a bit. Too many joins can
make your query expensive.
• Avoid the use of cursor.
• Return only the Rows and Columns needed.
• Fully qualify database objects.
http://www.hartmannsoftware.com/
ViewState is a bandwidth guzzler...
To make its handling simple, always remember that for almost all practical
purposes you can disable it for most of the controls (exception being
DropDownLists, Listboxes and TreeViews).
For TextBoxes, ViewState needs to be enabled only if you are using
Text_Changed event. In a page if you are absolutely sure that you don’t
require it all then it’s better to disable it at Page level. Add the following to
your Page directive <%@ Page EnableViewState="false" %>
http://www.hartmannsoftware.com/
SSL (Secure Socket Layer i.e. URLs beginning with https) is in fashion but
avoid it and use it only for pages that transmit sensitive information like
password, credit card number or any other information you deem sensitive. If
you are using SSL for a page make sure the page contains minimal graphics.
A web page deployed under simple http performs much faster than an https
page.
http://www.hartmannsoftware.com/
If you care about Scalability avoid using session state. Performance is not an
issue while you are using one web server but be prepared for the worst if you
are scaling out to multiple servers. At the same time, if you are sure that
your application will never require multiple servers (or you’ll always have a
limited number of users) session state is your best bait and performs faster
than any other state management options.
http://www.hartmannsoftware.com/
Use image sprites. Yes, this tip is more relevant to the UI designer than the
developer. Sprites reduce the number of server requests and hence your
page loads faster. W3Schools define an image sprite as a collection of
images put into a single image. So, you are downloading a single optimized
image with a single request rather than downloading multiple images with
multiple requests. With CSS, you can define the coordinates to show just the
part of the image you need
http://www.hartmannsoftware.com/
Add script references at the bottom of the page. Script
references mainly JavaScript are common in ASP.Net applications, and if they
are referred at the top the asynchronous downloads halt when a script
reference is reached, severely impacting the page performance.
http://www.hartmannsoftware.com/
For applications with huge number of users spread around
the globe, use CDN (Content Delivery Network) for hosting images and
scripts. This reduces load on your server and your users experiences a quick
response from your application.
http://www.hartmannsoftware.com/
Include the values of height and width attribute in tag.
Yes, this is another one for UI designers! With a well-defined explicit height
and width attribute space can be allocated for the image before it is
downloaded i.e. quick page load.
http://www.hartmannsoftware.com/
Validate form entries on the client using JavaScript. This
helps to avoid unnecessary round trips to the server making your application
quick and responsive. It leads to a better user experience.
http://www.hartmannsoftware.com/
Never run production ASP.NET applications with debug=”true” enabled. By
default it is enabled true in your web.config file. At production server it must
be deployed with. There’s a detailed article devoted to this web.config debug
attribute from none other than Scott Guthrie (an ASP.Net authority and a big
shot at Microsoft Corp.) - See more at:
http://www.hartmannsoftware.com/Blog/Articles_from_Software_Fans/10-
Quick-Tips-to-Boost-Your-ASP-Net-Application-
Performance#sthash.oSHFUBZK.dpuf
Asp.Net Tips

More Related Content

What's hot

True Costs of Running Varnish
True Costs of Running VarnishTrue Costs of Running Varnish
True Costs of Running Varnishsection_io
 
CSE - Big Data Devops Support Engineer
CSE - Big Data Devops Support EngineerCSE - Big Data Devops Support Engineer
CSE - Big Data Devops Support EngineerCristy Laine Gavino
 
ASP.NET with VB.NET
 ASP.NET with VB.NET ASP.NET with VB.NET
ASP.NET with VB.NETShyam Sir
 
High Performance Web/Mobile Pages - Automation
High Performance Web/Mobile Pages - AutomationHigh Performance Web/Mobile Pages - Automation
High Performance Web/Mobile Pages - Automationsoheil416
 
Master page and Theme ASP.NET with VB.NET
Master page and Theme ASP.NET with VB.NETMaster page and Theme ASP.NET with VB.NET
Master page and Theme ASP.NET with VB.NETShyam Sir
 
Performance analysis in eCommerce (retail and Websphere Commerce)
Performance analysis in eCommerce (retail and Websphere Commerce)Performance analysis in eCommerce (retail and Websphere Commerce)
Performance analysis in eCommerce (retail and Websphere Commerce)IBM
 
Microservices Architecture for AEM
Microservices Architecture for AEMMicroservices Architecture for AEM
Microservices Architecture for AEMMaciej Majchrzak
 

What's hot (10)

True Costs of Running Varnish
True Costs of Running VarnishTrue Costs of Running Varnish
True Costs of Running Varnish
 
CSE - Big Data Devops Support Engineer
CSE - Big Data Devops Support EngineerCSE - Big Data Devops Support Engineer
CSE - Big Data Devops Support Engineer
 
What are the Types of Websites?
What are the Types of Websites?What are the Types of Websites?
What are the Types of Websites?
 
Ajax
AjaxAjax
Ajax
 
ASP.NET with VB.NET
 ASP.NET with VB.NET ASP.NET with VB.NET
ASP.NET with VB.NET
 
High Performance Web/Mobile Pages - Automation
High Performance Web/Mobile Pages - AutomationHigh Performance Web/Mobile Pages - Automation
High Performance Web/Mobile Pages - Automation
 
BH VPS
BH VPSBH VPS
BH VPS
 
Master page and Theme ASP.NET with VB.NET
Master page and Theme ASP.NET with VB.NETMaster page and Theme ASP.NET with VB.NET
Master page and Theme ASP.NET with VB.NET
 
Performance analysis in eCommerce (retail and Websphere Commerce)
Performance analysis in eCommerce (retail and Websphere Commerce)Performance analysis in eCommerce (retail and Websphere Commerce)
Performance analysis in eCommerce (retail and Websphere Commerce)
 
Microservices Architecture for AEM
Microservices Architecture for AEMMicroservices Architecture for AEM
Microservices Architecture for AEM
 

Viewers also liked

Party with third party final
Party with third party finalParty with third party final
Party with third party finalsamabacon
 
Supersize Your Reach with App Marketplaces
Supersize Your Reach with App MarketplacesSupersize Your Reach with App Marketplaces
Supersize Your Reach with App Marketplacessamabacon
 

Viewers also liked (15)

Party with third party final
Party with third party finalParty with third party final
Party with third party final
 
Итоги фестиваля СМИшка-2013
Итоги фестиваля СМИшка-2013Итоги фестиваля СМИшка-2013
Итоги фестиваля СМИшка-2013
 
Андрей Стельмах
Андрей СтельмахАндрей Стельмах
Андрей Стельмах
 
Ravi_raman_bday_ppt
Ravi_raman_bday_pptRavi_raman_bday_ppt
Ravi_raman_bday_ppt
 
СМИшная газета - 2013
СМИшная газета - 2013СМИшная газета - 2013
СМИшная газета - 2013
 
Tuzova-Schekina Svetlana
Tuzova-Schekina SvetlanaTuzova-Schekina Svetlana
Tuzova-Schekina Svetlana
 
Презентация первого заседания обновленной кафедры журналистики
Презентация первого заседания обновленной кафедры журналистикиПрезентация первого заседания обновленной кафедры журналистики
Презентация первого заседания обновленной кафедры журналистики
 
Vovnenko Aleks_ander
Vovnenko Aleks_anderVovnenko Aleks_ander
Vovnenko Aleks_ander
 
Александ Колесниченко
Александ КолесниченкоАлександ Колесниченко
Александ Колесниченко
 
Сергей Иванов
Сергей ИвановСергей Иванов
Сергей Иванов
 
Supersize Your Reach with App Marketplaces
Supersize Your Reach with App MarketplacesSupersize Your Reach with App Marketplaces
Supersize Your Reach with App Marketplaces
 
Современные технологии развития образования и культурного наследия
Современные технологии развития образования и культурного наследияСовременные технологии развития образования и культурного наследия
Современные технологии развития образования и культурного наследия
 
Butko Irina
Butko IrinaButko Irina
Butko Irina
 
Glebovitch Tatyana
Glebovitch TatyanaGlebovitch Tatyana
Glebovitch Tatyana
 
Татьяна Сверчкова
Татьяна СверчковаТатьяна Сверчкова
Татьяна Сверчкова
 

Similar to Asp.Net Tips

7 secrets of performance oriented front end development services
7 secrets of performance oriented front end development services7 secrets of performance oriented front end development services
7 secrets of performance oriented front end development servicesKaty Slemon
 
Website Performance at Client Level
Website Performance at Client LevelWebsite Performance at Client Level
Website Performance at Client LevelConstantin Stan
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web ApplicationSachin Walvekar
 
Measuring Web Performance
Measuring Web Performance Measuring Web Performance
Measuring Web Performance Dave Olsen
 
Web Speed And Scalability
Web Speed And ScalabilityWeb Speed And Scalability
Web Speed And ScalabilityJason Ragsdale
 
IEEE KUET SPAC presentation
IEEE KUET SPAC  presentationIEEE KUET SPAC  presentation
IEEE KUET SPAC presentationahsanmm
 
Web II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentWeb II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentRandy Connolly
 
DYNAMIC CONTENT TECHNOLOGIES ASP(ACTIVE SERVER PAGES)
DYNAMIC CONTENT TECHNOLOGIES ASP(ACTIVE SERVER PAGES)DYNAMIC CONTENT TECHNOLOGIES ASP(ACTIVE SERVER PAGES)
DYNAMIC CONTENT TECHNOLOGIES ASP(ACTIVE SERVER PAGES)Prof Ansari
 
Server and Client side comparision
Server and Client side comparisionServer and Client side comparision
Server and Client side comparisionStew Duncan
 
Websites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly WebsitesWebsites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly Websiteswebsiteunlimited
 
Scaling Web Apps P Falcone
Scaling Web Apps P FalconeScaling Web Apps P Falcone
Scaling Web Apps P Falconejedt
 
Building high scale, highly available websites in SharePoint 2010
Building high scale, highly available websites in SharePoint 2010Building high scale, highly available websites in SharePoint 2010
Building high scale, highly available websites in SharePoint 2010Ben Robb
 
Demystifying web performance tooling and metrics
Demystifying web performance tooling and metricsDemystifying web performance tooling and metrics
Demystifying web performance tooling and metricsAnna Migas
 
Best And Worst Practices Building Ria with Adobe and Microsoft
Best And Worst Practices Building Ria with Adobe and MicrosoftBest And Worst Practices Building Ria with Adobe and Microsoft
Best And Worst Practices Building Ria with Adobe and MicrosoftJosh Holmes
 
Internet applications unit1
Internet applications unit1Internet applications unit1
Internet applications unit1MSc CST
 
Performace optimization (increase website speed)
Performace optimization (increase website speed)Performace optimization (increase website speed)
Performace optimization (increase website speed)clickramanm
 

Similar to Asp.Net Tips (20)

7 secrets of performance oriented front end development services
7 secrets of performance oriented front end development services7 secrets of performance oriented front end development services
7 secrets of performance oriented front end development services
 
Website Performance at Client Level
Website Performance at Client LevelWebsite Performance at Client Level
Website Performance at Client Level
 
Presemtation Tier Optimizations
Presemtation Tier OptimizationsPresemtation Tier Optimizations
Presemtation Tier Optimizations
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web Application
 
Measuring Web Performance
Measuring Web Performance Measuring Web Performance
Measuring Web Performance
 
Tips to improve your website performance
Tips to improve your website performanceTips to improve your website performance
Tips to improve your website performance
 
Web Speed And Scalability
Web Speed And ScalabilityWeb Speed And Scalability
Web Speed And Scalability
 
IEEE KUET SPAC presentation
IEEE KUET SPAC  presentationIEEE KUET SPAC  presentation
IEEE KUET SPAC presentation
 
Web II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentWeb II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side development
 
DYNAMIC CONTENT TECHNOLOGIES ASP(ACTIVE SERVER PAGES)
DYNAMIC CONTENT TECHNOLOGIES ASP(ACTIVE SERVER PAGES)DYNAMIC CONTENT TECHNOLOGIES ASP(ACTIVE SERVER PAGES)
DYNAMIC CONTENT TECHNOLOGIES ASP(ACTIVE SERVER PAGES)
 
Server and Client side comparision
Server and Client side comparisionServer and Client side comparision
Server and Client side comparision
 
Websites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly WebsitesWebsites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly Websites
 
Scaling Web Apps P Falcone
Scaling Web Apps P FalconeScaling Web Apps P Falcone
Scaling Web Apps P Falcone
 
Building high scale, highly available websites in SharePoint 2010
Building high scale, highly available websites in SharePoint 2010Building high scale, highly available websites in SharePoint 2010
Building high scale, highly available websites in SharePoint 2010
 
Demystifying web performance tooling and metrics
Demystifying web performance tooling and metricsDemystifying web performance tooling and metrics
Demystifying web performance tooling and metrics
 
Best And Worst Practices Building Ria with Adobe and Microsoft
Best And Worst Practices Building Ria with Adobe and MicrosoftBest And Worst Practices Building Ria with Adobe and Microsoft
Best And Worst Practices Building Ria with Adobe and Microsoft
 
Modern Web Applications
Modern Web ApplicationsModern Web Applications
Modern Web Applications
 
Performance engineering
Performance engineeringPerformance engineering
Performance engineering
 
Internet applications unit1
Internet applications unit1Internet applications unit1
Internet applications unit1
 
Performace optimization (increase website speed)
Performace optimization (increase website speed)Performace optimization (increase website speed)
Performace optimization (increase website speed)
 

Recently uploaded

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 

Asp.Net Tips

  • 1. o improve the performance of an ASP.Net application you need to optimize your front-end UI (user interface) code as well as the back- end database. You can also think of the following tips as a brief best practices guide for the ASP.net performance optimization. http://www.hartmannsoftware.com/ T
  • 2. Use Stored Procedures. A Stored Procedure has an execution plan hence it always performs faster than T-SQL. Logic separation, Low network bandwidth consumption, improved data security and integrity are some of the added benefits of using a stored procedure. http://www.hartmannsoftware.com/
  • 3. Write efficient queries. A few tips: • If needed, de-normalize your database design a bit. Too many joins can make your query expensive. • Avoid the use of cursor. • Return only the Rows and Columns needed. • Fully qualify database objects. http://www.hartmannsoftware.com/
  • 4. ViewState is a bandwidth guzzler... To make its handling simple, always remember that for almost all practical purposes you can disable it for most of the controls (exception being DropDownLists, Listboxes and TreeViews). For TextBoxes, ViewState needs to be enabled only if you are using Text_Changed event. In a page if you are absolutely sure that you don’t require it all then it’s better to disable it at Page level. Add the following to your Page directive <%@ Page EnableViewState="false" %> http://www.hartmannsoftware.com/
  • 5. SSL (Secure Socket Layer i.e. URLs beginning with https) is in fashion but avoid it and use it only for pages that transmit sensitive information like password, credit card number or any other information you deem sensitive. If you are using SSL for a page make sure the page contains minimal graphics. A web page deployed under simple http performs much faster than an https page. http://www.hartmannsoftware.com/
  • 6. If you care about Scalability avoid using session state. Performance is not an issue while you are using one web server but be prepared for the worst if you are scaling out to multiple servers. At the same time, if you are sure that your application will never require multiple servers (or you’ll always have a limited number of users) session state is your best bait and performs faster than any other state management options. http://www.hartmannsoftware.com/
  • 7. Use image sprites. Yes, this tip is more relevant to the UI designer than the developer. Sprites reduce the number of server requests and hence your page loads faster. W3Schools define an image sprite as a collection of images put into a single image. So, you are downloading a single optimized image with a single request rather than downloading multiple images with multiple requests. With CSS, you can define the coordinates to show just the part of the image you need http://www.hartmannsoftware.com/
  • 8. Add script references at the bottom of the page. Script references mainly JavaScript are common in ASP.Net applications, and if they are referred at the top the asynchronous downloads halt when a script reference is reached, severely impacting the page performance. http://www.hartmannsoftware.com/
  • 9. For applications with huge number of users spread around the globe, use CDN (Content Delivery Network) for hosting images and scripts. This reduces load on your server and your users experiences a quick response from your application. http://www.hartmannsoftware.com/
  • 10. Include the values of height and width attribute in tag. Yes, this is another one for UI designers! With a well-defined explicit height and width attribute space can be allocated for the image before it is downloaded i.e. quick page load. http://www.hartmannsoftware.com/
  • 11. Validate form entries on the client using JavaScript. This helps to avoid unnecessary round trips to the server making your application quick and responsive. It leads to a better user experience. http://www.hartmannsoftware.com/
  • 12. Never run production ASP.NET applications with debug=”true” enabled. By default it is enabled true in your web.config file. At production server it must be deployed with. There’s a detailed article devoted to this web.config debug attribute from none other than Scott Guthrie (an ASP.Net authority and a big shot at Microsoft Corp.) - See more at: http://www.hartmannsoftware.com/Blog/Articles_from_Software_Fans/10- Quick-Tips-to-Boost-Your-ASP-Net-Application- Performance#sthash.oSHFUBZK.dpuf