We have performance issue that is we have custom control for data like gridview,that render data, Server control was working fine as long as there there is not huge volume of data but now when there is enough data then it take sufficient time to load page.
We have tried client side control, that get data by ajax request and then display it in custom table control but it also take much time to get data and then load it to custom control.
The usual approach is to offer a filtering ui so that the user can tell which row(s) he want to see and/or to use paging (ie showing at most 100 rows or whatever) rather than showing ton of rows and then let the use to browse among them to find the one he
want...
If you have this already unlike a local app that sometimes shows all and then let the user to filter data it's likely best to start with filtering ui before showing anything.
As respected fellow said that filtering is the best option to get filter data that is needed instead of all data, in case of server side control if you are using SQL Server and stored procedure to get data from database then you need to some modification/update
to get filter data and render it.
Here is example of Custom paging using stored procedure.
As far as client side control is concerned you can use a web method or service that will send you result like total number of records or you can return that result by including it in response result, then you need to get the page size and make N number of
request to server to get data and on each successful response you can append that result in your client control.
Member
5 Points
3 Posts
DATA loading issue
Jan 21, 2020 08:15 AM|Ch.Hashmat.Khan|LINK
We have performance issue that is we have custom control for data like gridview,that render data, Server control was working fine as long as there there is not huge volume of data but now when there is enough data then it take sufficient time to load page.
We have tried client side control, that get data by ajax request and then display it in custom table control but it also take much time to get data and then load it to custom control.
Any possible solution.
All-Star
48500 Points
18071 Posts
Re: DATA loading issue
Jan 21, 2020 08:20 AM|PatriceSc|LINK
Hi,
The usual approach is to offer a filtering ui so that the user can tell which row(s) he want to see and/or to use paging (ie showing at most 100 rows or whatever) rather than showing ton of rows and then let the use to browse among them to find the one he want...
If you have this already unlike a local app that sometimes shows all and then let the user to filter data it's likely best to start with filtering ui before showing anything.
Contributor
2096 Points
1040 Posts
Re: DATA loading issue
Jan 21, 2020 08:34 AM|Khuram.Shahzad|LINK
As respected fellow said that filtering is the best option to get filter data that is needed instead of all data, in case of server side control if you are using SQL Server and stored procedure to get data from database then you need to some modification/update to get filter data and render it.
Here is example of Custom paging using stored procedure.
https://www.aspsnippets.com/Articles/Custom-Paging-in-ASPNet-GridView-using-SQL-Server-Stored-Procedure.aspx
If you are using some other data control like grid view etc then you can laso use custom paging:
http://www.dotnetbull.com/2013/05/custom-paging-in-aspnet-using-stored.html
Contributor
2096 Points
1040 Posts
Re: DATA loading issue
Jan 21, 2020 08:37 AM|Khuram.Shahzad|LINK
As far as client side control is concerned you can use a web method or service that will send you result like total number of records or you can return that result by including it in response result, then you need to get the page size and make N number of request to server to get data and on each successful response you can append that result in your client control.