3

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

JD.
  • 15,171
  • 21
  • 86
  • 159
  • you can use telerik grid for asp.net mvc. it will do all paging and extra stuff itself. – Muhammad Adeel Zahid Apr 05 '11 at 07:41
  • 1
    jquery mobile is not supposed to be used with this kind of content. if you're using jquery mobile with this huge table of yours, then it's a huge mess. post/link some code or examples to get answers – naugtur Apr 05 '11 at 10:44
  • Yes, I agree. I just wanted to visually show some data and as I was using JQuerymobile in the past, I just used the styles etc. I will introduce paging to make it work (it was just a proof of concept to see how I would get the data out). Thanks. – JD. Apr 05 '11 at 11:45

4 Answers4

1

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.

sarvesh
  • 2,743
  • 1
  • 20
  • 30
1

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

Community
  • 1
  • 1
richaux
  • 2,622
  • 2
  • 35
  • 40
1

A table cannot be rendered before it is completly received by the browser. Because a small change in the last cell can cause layout changes in the total table.

600x30 cells is not that big, but it is not small either. So I can imagine the guys from Chrome not optimizing for this kind of tables.

Maybe performance will be better if you specify the width of each column.

GvS
  • 52,015
  • 16
  • 101
  • 139
0

My bad, I just wanted to get data in a table and as I was working with JQueryMobile in another project so I used the checkboxes from JQM which are not designed to handle large amounts of data.

I am currently paging and the data is shown as expected.

Thanks to all those that helped.

JD.
  • 15,171
  • 21
  • 86
  • 159