简体   繁体   中英

ASP.NET web page -> Best ways to display static information

I have webpage in the ASP.NET site wherein it shows about 3000 records (the number of records grew substantially after the code logic was written few years back). This page uses Jquery as well.

The display on the page is a tabular format with first column being an image (read from webserver location) and then Item Group and then Item numbers. It uses and this html is generated on the fly when user navigates to this webpage.

The page has started rendering slowly as number of records have increased.

I am planning to rewrite the logic here. Since the information doesn't change, I am thinking of displaying contents on the page by storing information as html and then just display the html when user navigates to this page. Are there any other better suggestions other than html.

Please suggest what are the best options here.

You mention that the "page has started rendering slowly as number of records have increased" and you decided to cache the generated HTML on the server and then serving the cached version when requested.

Keep in mind that any number of problems could be the bottleneck that is causing the page to be rendered slowly: Request (DNS lookups), Server (Database, Generating HTML), Response (Network), Render HTML (create DOM).

Before optimizing a specific portion of the app, I would see where the bottleneck actually exists.

I would recommend using the Timeline in Chrome developer tools to see where the bottleneck actually exists.

Personally, I believe the issue is either in the response taking a long time to download (make sure you gzip the response) or in rendering the HTML, but again, without instrumentation, this is just a guess.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM