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

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Recently uploaded (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

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