开发者

Is there a performance benefit switching jqGrid data source from XML to JSON (on IE8)

I have a jqGrid on a web page, with large data sets. Up to 100 rows (in XML format) are sometimes sent to the browser at a time. On IE8 the combined effect is a noticeable delay.

Will changing the data source to JSON (instead of XML) have a measurable effect in these conditions?

Note: I know this is an IE specific problem. On Chrome I get an 开发者_运维问答instant response on the same page. But I'm currently targeting IE8 :(


JSON has native support in JavaScript, so in the most cases the working with JSON is more quickly. Moreover, the size of JSON response from the server are smaller as the corresponding XML response. So I would recommend you to switch to JSON.

Nevertheless in many cases the real jqGrid example can has more other performance bottlenecks which independent on the data format. Moreover you can also choose different implementation in JSON which represent your data. So the best recommendation one could get you if you append your question with the current jqGrid definition, define which is the best id for the data row and post the test XML data.

UPDATED: Look at some old answers about jqGrid performance optimization: this, this and this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜