SlideShare a Scribd company logo
1 of 3
Download to read offline
sales@biztechcs.com
Improve your Asp.Net Performance with these 5
Methods
When we talk about performance, ASP.Net is the first platform that comes in our
mind. It is a stable foundation with power pack features for web applications.
However, to ensure the smooth working of an application, it is necessary to check
the application performance from time to time. Removing the unnecessary codes,
updating the latest version and advanced features are the few ways to improve
your ASP.Net Core application performance. Let’s find out more!
1. Avoid Blocking Calls
Design your ASP.Net Core application to execute multiple processes
simultaneously using an Asynchronous API handling numerous requests without
waiting on blocking calls. Instead of waiting for the synchronous tasks to
complete, it starts working on another thread.
The common mistake we make is calling Task.Wait or Task.Run that blocks
asynchronous execution and results in unnecessary thread pool scheduling. So
avoid calling Task.Run as ASP.Net Core already runs the thread in the normal
thread pool.
Instead, try using hot code paths, call data access, I/O, and long-running patterns
and API asynchronously. Make control/razer page actions asynchronous to
benefit from​ ​async/await​ patterns.
2. Use Cache
The common trick to increase the application performance is to reduce the
number of server requests sent out. This can be achieved if we store the received
response from the server. That means, the next time a call is made for a similar
response, instead of requesting the server, the caching feature would first check
the stored data and if it matches, retrieve it and send it to the user without calling
www.biztechcs.com
sales@biztechcs.com
the server; saving time and improving the overall performance. Usually, there are
three types of caching: client-side, server-side, or client/server-side. Talking about
ASP.Net Core Development​, it provides caching in-memory, response caching, and
distributed caching.
3. Optimize Data Access and I/O
Accessing data by interacting with data stores is the slowest part of an ASP.Net
Core application. Thus, it is crucial to read and write effectively for good
performance.
Recommendations:
● Call all the data asynchronously
● Do not retrieve more than the required data
● Consider caching frequently. Use MemoryCache or a
DistributedCache depending on the scenario
● Minimize the network round trips
● Try to retrieve the data in a single call rather than multiple calls
● Use no-tracking queries in Entity Framework Core while accessing
read-only data as it returns the results efficiently
● Filter and aggregate LINQ queries so that database performs
filtration
● Do not use projection queries on collections as they can result in
“N+1” SQL queries
Recommendation: Measure the impact of high performing queries before coding.
4. Handle Response-Request Process Asynchronously
We know that a controller and page model can handle most of the app requests
by calling the necessary services. So try to complete long-running tasks outside of
HTTP requests by handling the requests with background services. Use real-time
communication options such as​ ​SignalR​ for communication with clients
www.biztechcs.com
sales@biztechcs.com
asynchronously. Completing the work out of the process is beneficial for CPU
intensive tasks.
Recommendation: Avoid reading large requests into memory.
5. Use Response Caching Middleware
To fasten your code performance, use middleware components that request
processing pipelines, and optimize the frequently-called code paths by storing
responses and serving them later through the cache. The common examples
include - custom logging, authorization handlers, or initialization of transient
services.
Recommendation: Do not use custom middleware components with long-running
tasks.
Bonus​ ​Tips to Improve ASP.Net Core Development
● Avoid synchronous read or write on HttpRequest/HttpResponse
body
● Prefer ReadFormAsync over Request.Form
● Avoid reading large request bodies or response bodies into memory
● Do not store IHttpContextAccessor.HttpContext in a field
● Do not access HttpContext from multiple threads
With these tips, you can improve your ASP.Net application performance. Hire
ASP.Net Developer or contact your ​ASP.Net development company to implement
these features in your application today.
This Article Post is Originally Posted Here:
https://www.sooperarticles.com/internet-articles/web-development-articles/imp
rove-your-asp-net-performance-these-5-methods-1790992.html
www.biztechcs.com

More Related Content

More from Biztech Consulting & Solutions

12 best programming languages for web & app development
12 best programming languages for web & app development12 best programming languages for web & app development
12 best programming languages for web & app developmentBiztech Consulting & Solutions
 
Augmented reality in retail beginning of an immersive era
Augmented reality in retail beginning of an immersive eraAugmented reality in retail beginning of an immersive era
Augmented reality in retail beginning of an immersive eraBiztech Consulting & Solutions
 
9 reasons why angular js web development should be your choice in 2020
9 reasons why angular js web development should be your choice in 20209 reasons why angular js web development should be your choice in 2020
9 reasons why angular js web development should be your choice in 2020Biztech Consulting & Solutions
 

More from Biztech Consulting & Solutions (16)

Microservices: Detailed Guide
Microservices: Detailed GuideMicroservices: Detailed Guide
Microservices: Detailed Guide
 
12 best programming languages for web & app development
12 best programming languages for web & app development12 best programming languages for web & app development
12 best programming languages for web & app development
 
Cross platform app development a complete guide
Cross platform app development a complete guideCross platform app development a complete guide
Cross platform app development a complete guide
 
Complete guide on mobile app maintenance
Complete guide on mobile app maintenanceComplete guide on mobile app maintenance
Complete guide on mobile app maintenance
 
Everything you need to know about flutter 2.2
Everything you need to know about flutter 2.2Everything you need to know about flutter 2.2
Everything you need to know about flutter 2.2
 
11 reasons why flutter is better for app development
11 reasons why flutter is better for app development11 reasons why flutter is better for app development
11 reasons why flutter is better for app development
 
Augmented reality in retail beginning of an immersive era
Augmented reality in retail beginning of an immersive eraAugmented reality in retail beginning of an immersive era
Augmented reality in retail beginning of an immersive era
 
Challenges of adopting ar in education
Challenges of adopting ar in educationChallenges of adopting ar in education
Challenges of adopting ar in education
 
Why you should choose a custom app over a clone app
Why you should choose a custom app over a clone app Why you should choose a custom app over a clone app
Why you should choose a custom app over a clone app
 
Magento e commerce development trends for 2020
Magento e commerce development trends for 2020Magento e commerce development trends for 2020
Magento e commerce development trends for 2020
 
9 reasons why angular js web development should be your choice in 2020
9 reasons why angular js web development should be your choice in 20209 reasons why angular js web development should be your choice in 2020
9 reasons why angular js web development should be your choice in 2020
 
SugarCRM Brochure - Biztech Consultancy
SugarCRM Brochure - Biztech ConsultancySugarCRM Brochure - Biztech Consultancy
SugarCRM Brochure - Biztech Consultancy
 
CakePHP Brochure - Biztech Consultancy
CakePHP Brochure - Biztech ConsultancyCakePHP Brochure - Biztech Consultancy
CakePHP Brochure - Biztech Consultancy
 
Top 5 IDE that Simplifies PHP Development
Top 5 IDE that Simplifies PHP DevelopmentTop 5 IDE that Simplifies PHP Development
Top 5 IDE that Simplifies PHP Development
 
Top 5 Tips to Integrate Your ERP with CRM System
Top 5 Tips to Integrate Your ERP with CRM SystemTop 5 Tips to Integrate Your ERP with CRM System
Top 5 Tips to Integrate Your ERP with CRM System
 
Tech Future – The Mobile Applications
Tech Future – The Mobile ApplicationsTech Future – The Mobile Applications
Tech Future – The Mobile Applications
 

Recently uploaded

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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
 
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
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
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
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

Recently uploaded (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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...
 
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
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

Improve your asp.net performance with these 5 methods

  • 1. sales@biztechcs.com Improve your Asp.Net Performance with these 5 Methods When we talk about performance, ASP.Net is the first platform that comes in our mind. It is a stable foundation with power pack features for web applications. However, to ensure the smooth working of an application, it is necessary to check the application performance from time to time. Removing the unnecessary codes, updating the latest version and advanced features are the few ways to improve your ASP.Net Core application performance. Let’s find out more! 1. Avoid Blocking Calls Design your ASP.Net Core application to execute multiple processes simultaneously using an Asynchronous API handling numerous requests without waiting on blocking calls. Instead of waiting for the synchronous tasks to complete, it starts working on another thread. The common mistake we make is calling Task.Wait or Task.Run that blocks asynchronous execution and results in unnecessary thread pool scheduling. So avoid calling Task.Run as ASP.Net Core already runs the thread in the normal thread pool. Instead, try using hot code paths, call data access, I/O, and long-running patterns and API asynchronously. Make control/razer page actions asynchronous to benefit from​ ​async/await​ patterns. 2. Use Cache The common trick to increase the application performance is to reduce the number of server requests sent out. This can be achieved if we store the received response from the server. That means, the next time a call is made for a similar response, instead of requesting the server, the caching feature would first check the stored data and if it matches, retrieve it and send it to the user without calling www.biztechcs.com
  • 2. sales@biztechcs.com the server; saving time and improving the overall performance. Usually, there are three types of caching: client-side, server-side, or client/server-side. Talking about ASP.Net Core Development​, it provides caching in-memory, response caching, and distributed caching. 3. Optimize Data Access and I/O Accessing data by interacting with data stores is the slowest part of an ASP.Net Core application. Thus, it is crucial to read and write effectively for good performance. Recommendations: ● Call all the data asynchronously ● Do not retrieve more than the required data ● Consider caching frequently. Use MemoryCache or a DistributedCache depending on the scenario ● Minimize the network round trips ● Try to retrieve the data in a single call rather than multiple calls ● Use no-tracking queries in Entity Framework Core while accessing read-only data as it returns the results efficiently ● Filter and aggregate LINQ queries so that database performs filtration ● Do not use projection queries on collections as they can result in “N+1” SQL queries Recommendation: Measure the impact of high performing queries before coding. 4. Handle Response-Request Process Asynchronously We know that a controller and page model can handle most of the app requests by calling the necessary services. So try to complete long-running tasks outside of HTTP requests by handling the requests with background services. Use real-time communication options such as​ ​SignalR​ for communication with clients www.biztechcs.com
  • 3. sales@biztechcs.com asynchronously. Completing the work out of the process is beneficial for CPU intensive tasks. Recommendation: Avoid reading large requests into memory. 5. Use Response Caching Middleware To fasten your code performance, use middleware components that request processing pipelines, and optimize the frequently-called code paths by storing responses and serving them later through the cache. The common examples include - custom logging, authorization handlers, or initialization of transient services. Recommendation: Do not use custom middleware components with long-running tasks. Bonus​ ​Tips to Improve ASP.Net Core Development ● Avoid synchronous read or write on HttpRequest/HttpResponse body ● Prefer ReadFormAsync over Request.Form ● Avoid reading large request bodies or response bodies into memory ● Do not store IHttpContextAccessor.HttpContext in a field ● Do not access HttpContext from multiple threads With these tips, you can improve your ASP.Net application performance. Hire ASP.Net Developer or contact your ​ASP.Net development company to implement these features in your application today. This Article Post is Originally Posted Here: https://www.sooperarticles.com/internet-articles/web-development-articles/imp rove-your-asp-net-performance-these-5-methods-1790992.html www.biztechcs.com