This is a migrated thread and some comments may be shown as answers.

Slow ServerPaging

4 Answers 163 Views
Grid
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 11 Sep 2013, 10:01 PM
Hi,

I was trying to create a quick KendoUI demo with a small table.

The table is about 14 columns with 139 row.

The demo consists of a chart to display the first row of the grid and 2 grids just to test that it is possible to show 2 grids...

I used firebug to test the load time... it takes 1.39 secs on average... would like it to be fast if possible...

But what is annoying is that when I click to another page on the grid, each page showing only 10 records, it takes over 2 seconds?!?

I don't understand why it takes longer to page across pages than to load the entire page...

I also tried this via AJAX using MVC but the same page takes 6 seconds to load and paging there takes 6 seconds too...

Can anyone tell me why the demo I am using with BindTo is taking so long to page between pages?

I've been looking at JQgrid and its instantaneous there.... I can't see why it is so slow in KendoUI....


Regards,

William

4 Answers, 1 is accepted

Sort by
0
William
Top achievements
Rank 1
answered on 11 Sep 2013, 10:10 PM
I have tried this in Internet Explorer 9 and Internet Explorer 10, Chrome, Firefox.

It is slow in all of them...

0
William
Top achievements
Rank 1
answered on 11 Sep 2013, 10:27 PM
To test I disabled paging on the grid so it shows ALL 139 records.

I noticed in firebug that it takes around 7 seconds to load... how would I enable just client side paging as I can't seem to find any documentation on how to do that using BindTo on the grid...

By default it seems to be server side...

0
William
Top achievements
Rank 1
answered on 13 Sep 2013, 01:31 PM
Is there anyway for the chart and the grids to use the same datasource?

If I switch the grids to use AJAX and get their data from a controller, then each grid get their own data... is there anyway to get them to use the same data so I don't have to wait 8 seconds for each grid to load? Two grids mean that I generally have to wait 16secs for it load... Three grids would mean 24secs...


0
Petur Subev
Telerik team
answered on 13 Sep 2013, 01:34 PM
Hello William,

What you have implemented is your own custom binding are the developer is responsible to create efficient query to the database.

In your case you have plenty of queries here:

MA_BND = g.Where(c => c.StrategyCode == "MA_BND").Sum(c => c.DailyTotalPNL),
MA_CDX = g.Where(c => c.StrategyCode == "MA_CDX").Sum(c => c.DailyTotalPNL),
MA_CRD = g.Where(c => c.StrategyCode == "MA_CRD").Sum(c => c.DailyTotalPNL),
MA_EEM = g.Where(c => c.StrategyCode == "MA_EEM").Sum(c => c.DailyTotalPNL),
MA_EUR = g.Where(c => c.StrategyCode == "MA_EUR").Sum(c => c.DailyTotalPNL),
MA_GLD = g.Where(c => c.StrategyCode == "MA_GLD").Sum(c => c.DailyTotalPNL),
MA_JPY = g.Where(c => c.StrategyCode == "MA_JPY").Sum(c => c.DailyTotalPNL),
MA_RUS = g.Where(c => c.StrategyCode == "MA_RUS").Sum(c => c.DailyTotalPNL),
MA_SLV = g.Where(c => c.StrategyCode == "MA_SLV").Sum(c => c.DailyTotalPNL),
MA_SOY = g.Where(c => c.StrategyCode == "MA_SOY").Sum(c => c.DailyTotalPNL),
MA_SPX = g.Where(c => c.StrategyCode == "MA_SPX").Sum(c => c.DailyTotalPNL),
MA_T10 = g.Where(c => c.StrategyCode == "MA_T10").Sum(c => c.DailyTotalPNL),
MA_T30 = g.Where(c => c.StrategyCode == "MA_T30").Sum(c => c.DailyTotalPNL),
MA_TBL = g.Where(c => c.StrategyCode == "MA_TBL").Sum(c => c.DailyTotalPNL),

Did you try to use the built-in paging/sorting/filtering/grouping/aggregates? You can save some of this work above and improve the performance I guess.

There is nothing fancy to enable it, just follow the instruction here:

http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/helpers/grid/server-binding


Kind Regards,
Petur Subev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
William
Top achievements
Rank 1
Answers by
William
Top achievements
Rank 1
Petur Subev
Telerik team
Share this question
or