Page 1 of 1

Speed problem when change number or rows in grid and render

Posted: Fri Jul 26, 2013 1:33 pm
by deonreid
I have a subfile and I am loading all the records at the same time. If I leave the number of rows at it's default of 18, the screen loads immediately. However, if I put javascript in the onload event to change the number of rows, to say 300 which is what the number of rows in the subfile is, and render the grid, the screen takes over 15 seconds to load.

This is the java script i placed in the onload event:

getObj("Grid1").grid.setProperty("number of rows", get("NumRows"));
getObj("Grid1").grid.render();

Re: Speed problem when change number or rows in grid and render

Posted: Sat Jul 27, 2013 6:37 pm
by Scott Klement
'number of rows' refers to how many fit on one "page" of the subfile at a time. Or one larger than the page if you have a header on the subfile. (It is not the total size of the subfile.)

So you're asking it to fit 300 rows on a single page of the subfile. Maybe you meant to set the "subfile size" property instead, which specifies the total size of the subfile?

Setting "subfile size" is really not necessary, though, as PUI will automatically expand the size of the subfile if it needs to.

Re: Speed problem when change number or rows in grid and render

Posted: Mon Jul 29, 2013 8:37 am
by deonreid
I am trying to show the entire subfile on one page. I make the number of rows = number or records in subfile. The use will then use the browser's scroll bar to view the records.

Re: Speed problem when change number or rows in grid and render

Posted: Mon Jul 29, 2013 11:53 am
by Scott Klement
Unfortunately, our grid controls are known to be slow when displaying so many records at once. We looked into this awhile ago and tried to optimize it as best as possible...

In order to allow things like resizable columns, the ability to move columns around, the ability to embed any widget you wish within a cell, etc, we've got a lot of different HTML elements being drawn as part of the grid. (It's not just an HTML table.) So the more you attempt to draw at once, the more memory it uses, and the longer it will take to render.

You might find that it works better in a more efficient browser (for example, try it on Chrome or Firefox)? May be worth a shot.

I wish I had a better answer for you!