Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by j.lagos on Jan 16, 2009 06:53
open dhtmlx forum
Slow after loading

In the PRO ver, I use the Layout with 7 Grids.

The two of the Grids have 10 columns and 300 rows total.
The other Grids are smaller with 3 columns and with an average of 50 rows.

To one of the grids I use the event onRowAdded, in order to Insert to the smaller grids and to perform a sort on them.

The loading of the Grigd performed with the use of mygrid.addRow!

Ok, it is a have duty thing. In the start is very fast and at the end very very slow.

After the job is finished, it is to much dificult to move the layout window, scroll, minimize, etc...

I don't think the data loaded are so big to slowdown the Firefox.
Is there something else that makes it so heavy? Or is another way, to split perhaps the Grids, as to get faster?

Thanks in advance,
John
Answer posted by Support on Jan 16, 2009 09:40
>>with the use of mygrid.addRow!
Using smart rendering and load instead of addRow can improve performance a lot ( you can use load from js array which is very similar to addRow in syntax ) 
Also, it possible to use startFastOperations and stopFastOperations before and after addRow calls ( beware it will disable onRowAdded event )
Answer posted by j.lagos on Jan 19, 2009 01:19

In case of JS array, how can I set row ID?

 

Thanks,

John

Answer posted by Support on Jan 19, 2009 02:02
In case of loading from js-array - IDs are auto-generated, they are numbers from 1 to n ( first line in array will have ID 1 , second 2 , etc. ) 
If you  need to define separate IDs, you may use loading from JSON, where ID defined separately. 

http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Loading_data_in_grid.html#grid_art_loadingdata
Answer posted by j.lagos on Jan 19, 2009 08:14

So, I try the JSON format to load my Grid.

mygrid.load(/jsonThread.php+"?date="+fdate,"json");
mygrid.parse(js,"json");

The rsponse text for one row from the calling php is:

var js={rows:[{ id: '00000329',data:['P','B','A','00000329','260','260','0.92','D','CB00C','O']}]}
but I get the error:
syntax error
data=;
 
Thanks,
John
Answer posted by j.lagos on Jan 19, 2009 08:28

I remove var js and it is OK!

 

Thanks