PDA

View Full Version : 40000 Records in on Store from a XML File



Richie1985
6 Mar 2012, 10:23 AM
Hello,

i want to load a xml file (3,5mb, 40000 rows) in a store. on every time he load this much rows my browser wont react (firefox, chrome, interexplorer). is there a better way to load much rows like this:


Ext.define('marker',{
extend: 'Ext.data.Model',
fields: [
{name: 'id', mapping: 'id'},
{name: 'lat', mapping: 'lat'},
{name: 'lng', mapping: 'lng'},
{name: 'color', mapping: 'color'}
]
});


marker_store = Ext.create('Ext.data.Store', {
model: 'marker',
autoLoad: true,
proxy: {
type: 'ajax',
url: 'adressen_xml.php',
reader: {
type: 'xml',
record: 'items',
idProperty: 'id'
}
}
});

thank you!

mitchellsimoens
6 Mar 2012, 11:34 AM
40,000 records is going to take a while especially XML where it has to parse the DOM. JSON would perform better but 40,000 is still quite a lot.

Richie1985
6 Mar 2012, 1:33 PM
ok is there any other solution? the data comes from a mssql database. i read them with php and build so the xml file.

Richie1985
7 Mar 2012, 3:04 AM
okay my problem is not that i have to wait some seconds. my problem is that the whole browser wont react like in the screen? i want to reload the data every 5 minutes and on each reload i cant surf or do anything else on other tabe etc.

32451

dedoz
7 Mar 2012, 10:37 PM
why u need to load them ? maybe the solution wont require you to load 40.000 records i dont think youll read (human reading) 40.000 records, maybe u want to calculate some stadistics ? or looking for some special records ?

Richie1985
8 Mar 2012, 12:21 AM
hi i think the problem is the mix. i want to show arround 40000 markers on a google map embedded in a extjs viewport. i also work with google maps markercluster to. here you can find a demo the looks same like me: http://v2.maptimize.com/livedemo. but there i works like a charme ... i think i have to cluster on the server side, but i dont know how...