I have the following queries regarding the loading time of asp.net page. Anyone can help. What are the possibilities of asp.net page consuming more loading time?. How to reduce the loading time of asp.net web page?
-
What are you doing in the page? – Rajan Mar 30 '17 at 06:15
-
Consuming data from database and display it on a Gridview. Then Edit and delete operations on those data in the Gridview – Jino Shaji Mar 30 '17 at 07:37
3 Answers
Images used
- The images used should be optimized and consider low file size.
- Allow Caching of images
Reduce number of scripts and stylesheets
- Try minimizing and combining CSS and script files
Enable HTTP Compression
Compilation should be on release mode ie, remove
<compilation debug="true"/>
from web.configCheck the Viewstate, big viewstates slow downs the page.
If you are consuming the database, try database level paging, if the number of records are higher. Consider fetching only the required fields.
Five possibilities I can think of (aside from some advanced caching techniques and such):
Improper sizing of the web server for ASP.NET (i.e. thought a server sized for classic ASP would be fine)
Forgetting to remove from the web.config and getting less than optimal code.
JIT for the first visit
Code embedded in the page (as opposed to the compiled code-behind) that requires compilation before and in addition to the JIT.
ViewState (for ASP.NET WebForms) gets too big. Hope it will help

- 1,796
- 16
- 23
If you are selecting data from a database on startup, I would pay attention not to:
Select not needed data from the database doing stuff like
SELECT * from TabelX
I would specify exactly what columns to use
Don't load all the data in a list at the beginning, but load id only when you need it. More than this, I would load like only 20-50-100 rows, only those that can be shown on the page at a time.
If you are joining large number of rows, I would consider creating views.

- 605
- 1
- 8
- 27