Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Large html page from Asp.net mvc

I have a view which basically shows a bunch of rows and columns in a grid (which come directly from a table).

So far this is working fine, however, when I have 600 rows in the table and about 30 columns the page is not viewed in Chrome whilst the CPU stays at about 50%.

Clearly I need to put in some sort of paging but I was wondering whether this is as expected (i.e. large html documents cannot be viewed in a browser) and also is there a way I can save the view as a text file rather than trying to view it in the browser? In other words, to see the content of the page (like page view source) before the browser tries to render it.

** Further Investigation **

I am currently using JQueryMobile and I removed the scripts the page references and the table is no loading. Any ideas why the scripts are causing so much problems with loading?

TIA

JD

like image 700
JD. Avatar asked Dec 01 '25 16:12

JD.


2 Answers

It would depend on quite a few things like your hardware, how much data is returned and what your are doing with the data once it is returned and the browser itself. You could try a different browser and see if there is any difference. You are right about paging, you will need it to make it work in acceptable manner.

The browser needs to download the page before you can see the source, this can't be done before the page is completely downloaded. If you just want to see the contents of the page you can use curl to pull down the file to the local filesystem.

like image 167
sarvesh Avatar answered Dec 04 '25 06:12

sarvesh


I would say that behaviour is expected; as you say, paging is a possible solution.

You could choose to render to Excel or CSV. There are other Q&As on SO that give the basics for this, e.g.

CSV

Excel

like image 37
richaux Avatar answered Dec 04 '25 07:12

richaux



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!