Compare performance between Ext.data.JsonReader and Ext.data.ArrayReader
Im using JsonReader
to load my data, but it seem to low performance with a large data. I want to replace JsonReader
with ArrayReader
. I'm sure that the size of data that server response will smaller if I use ArrayReader
, but not sure if the performance开发者_如何学JAVA is improved.
You're probably not going to get much faster either way. Under the hood, JsonReader simply evals the JSON string straight into an object (and if the browser supports the native JSON.parse
function, it calls that instead which is even better). In fact, I would guess that ArrayReader will be slower since it actually iterates over the array to pull the data into records. Of course you can simply test this out yourself -- changing the reader type is a trivial change. I'm assuming that you'll have to take a closer look at how much data you are returning from the server.
精彩评论