View Full Version : PagingToolbar Problem in Loading Huge datas

26 Nov 2013, 1:50 AM
I am developing an application in ExtJS.I am using grid to display records.The Grid is loading 1200k
row of datas from a table in database.So that i used PagingToolbar.I set the "limit" to "200".when
clicking "Next" button it loads the next "200" records.But when clicking "Last page" button my application is crashed and takes full system memory.While looking at "Ext.PagingToolbar" source "moveLast" function gets the totalcount from the database.This seems to be the problem.how can i change this code?Could you please help me to fix this issue?

3 Dec 2013, 12:54 PM
Loading 1,200k or even 1,200 records is not recommended, you need to only load 1 page at a time

11 Dec 2013, 2:01 AM
Thanks for your reply michellsimoens.In our application we are using pagingToolBar.It seems that it loads all the records from db when we click on the navigate to last page button, when the number of records has been increased and If we try to navigate to the last page the application crashes because of the component loads all the records into the memory. We need your help to know is there any possility to restrict the component to load only the last page records instead of loading all the records in memory. It will be grateful if we get any solution or workaround to resolve this behavior.Thanks in advance.

12 Dec 2013, 1:37 AM
As far as I understand you load all the records from the database and you set totalcount. Then you expect ExtJs will page your records. This is wrong.

If you load 25 record per page load just 25 records on the server side and then set totalcount to all the record in the table. This way your server side will manage paging.

I have several hundreds grids working perfectly with filters and sorting incuded.