Results 1 to 4 of 4

Thread: PagingToolbar Problem in Loading Huge datas

  1. #1
    Sencha Premium Member
    Join Date
    Nov 2013
    Posts
    4
    Vote Rating
    0
      0  

    Exclamation PagingToolbar Problem in Loading Huge datas

    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?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Vote Rating
    1271
      0  

    Default

    Loading 1,200k or even 1,200 records is not recommended, you need to only load 1 page at a time
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha Premium Member
    Join Date
    Nov 2013
    Posts
    4
    Vote Rating
    0
      0  

    Default

    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.

  4. #4
    Sencha User bkraut's Avatar
    Join Date
    Nov 2007
    Location
    Maribor, Slovenia
    Posts
    402
    Vote Rating
    1
      0  

    Default

    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •