1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    2
    Vote Rating
    0
    revathi.visolve is on a distinguished road

      0  

    Default How to do query in JSON Store

    How to do query in JSON Store


    Hi,

    Inorder to reduce repeated call to server, I want to load my data set into JSON store and to do querying on it..


    var myStore= new Ext.data.JsonStore ({
    id: 'myStore',
    pageSize: 100,
    model: myModel,
    remoteSort: true,
    proxy: {
    type: 'ajax',
    url : url+'/getJsonData',
    reader: {
    type: 'json',
    root: 'data',
    totalProperty: 'totalCnt'
    },
    }

    });


    Here I used method myStore.queryBy() for querying store,

    myStore.queryBy(function(record, id) {
    return (record.get('title') == 'Diff*');
    });

    But this is not returing json inturn.. I want a method to query jsonStore (which may around 1000 records), after quering it should return result which should be again json data (say around 10 records)..

    Please let me know am I following correct procedure and is there a method / way to solve this..

    Thanks..

  2. #2
    Sencha User
    Join Date
    Apr 2012
    Posts
    2
    Vote Rating
    0
    revathi.visolve is on a distinguished road

      0  

    Default Performance issue for Large set data in JSON Store

    Performance issue for Large set data in JSON Store


    Ok.. Let me explain the exact issue.

    My records in database is more than 60,000.. Data transfer over network is not a problem, but ExtJs is taking much time to load it in store and eventhough I go for paging in grid / combo, its not getting loaded and server call breaks and browser hangs/crashes..

    At first, I though of loading entire data (60,000) in grid and do filtering over there.. But its doesn't worked out and if I go for records around 5000, there was not issue..

    Then I removed the store mapping in Grid and did only jsonStore load

    var grid = new Ext.grid.GridPanel({
    // store: myStore,
    autoScroll:true,
    columns: [
    {header: "id", width: 60, dataIndex: 'id', sortable: true},
    {header: "title", width: 120, dataIndex: 'title', sortable: true},
    ......
    ],
    bbar: Ext.create('Ext.PagingToolbar', {
    // store: myStore,
    displayInfo: true,
    displayMsg: 'Displaying topics {0} - {1} of {2}',
    emptyMsg: "No topics to display"
    }),
    width: 540,
    height: 500
    });

    Here eventhough it took time, jsonStore got loaded completely.. So I am trying to do some query in jsonStore and place those result in grid..

    I am wondering is there any solution to load large data set into JsonStore and load them in grid/combo box.. My client performance is really bad on loading bulk data..

    I don't want to make server call each time for search keyword..

    Any help please..

    Thanks..

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi