Results 1 to 3 of 3

Thread: Go direct to proxy and avoid sync() batching

  1. #1
    Ext User
    Join Date
    Dec 2010
    Vote Rating

    Default Go direct to proxy and avoid sync() batching

    I am loading about 2MB of JSON data from my server, and then persisting that locally using LocalStorage.

    The code is fairly simple. It does an add() on the local store for each record retrieved from the server.
    Then I perform a sync().

    Since this is a large data set, the actual batch insert operations seem to take up to 30 seconds (however, it's async so I don't see the delay on the application).

    What I am finding is that in Safari, the sync() is happening in the background (I know this because the process safari.exe process keeps running until the sync() is complete, which is good). If I kill the safari.exe process, I seem to corrupt my localstorage.

    However, I find that with the iPad when the web app is "installed" to the spring board, pressing the Home button seems to kill my process, and will also corrupti my datastore.

    In contrast, if I run my app in Safari on the iPad, since the Safari process is always running, I don't seem to hit this issue.

    My question: Is there a callback to know when sync() is complete, so at least I can show a progress panel during this 30 seconds?

    Or is there a way I can take over and control the proxy to insert non-batched? I'm thinking something like REST, but for localstorage.


  2. #2
    Ext User xnakxx's Avatar
    Join Date
    Sep 2010
    Central Valley Ca
    Vote Rating


    look at autosave

    not too sure of any performance ramifications tho

  3. #3
    Ext User
    Join Date
    Jul 2010
    Vote Rating


    hi termy21,

    Can you please share what you did to save remote JSON to localstorage? using a sample code?

    i cant seem to get my head round it as i havent found an examples on this..


Similar Threads

  1. How To sync store / proxy / Model with "submodel" and localstorage
    By hq242 in forum Sencha Touch 1.x: Discussion
    Replies: 0
    Last Post: 30 Jul 2010, 5:58 AM
  2. Simple Ext.Direct-Combobox plugin --- with Ext.Direct.Store for reuse
    By xp743 in forum Ext 3.x: User Extensions and Plugins
    Replies: 1
    Last Post: 26 Jul 2010, 11:56 AM
  3. Batching data...approaches for configuring the JsonStore?
    By js_coder in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 25 Jan 2010, 9:10 AM
  4. Stores Sync
    By krycek in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 19 Dec 2007, 10:23 AM

Posting Permissions

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