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 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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.