javascript线程化 [英] Threading in javascript

查看:73
本文介绍了javascript线程化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Developers,
我正在处理大量xml数据到来的项目,我使用页面上的javascript绑定了这些数据.由于此大数据页会导致hange且性能下降.因此,我需要一个使绑定变得容易的解决方案.

我认为线程化是一种解决方案.我用谷歌搜索了很多,但是找不到任何解决方案.那里有html worker(html 5),但它仅支持现代浏览器.因此,如果您有任何建议,请告诉我,这样我可以改善页面性能.

谢谢...

Hello Developers,
I am working on the project where large amount of xml data comes and i bind that data using javascript on page. Because of this large data page gets hange and performance decreased. So i need a solution where this binding become easy.

I think threading is one solution. I googled a lot but i cant find any solution. html worker is there (html 5) but it supports mordern browsers only. so if you have any suggestion then please let me know so i can improve my page performance.

Thanks...

推荐答案

作为 Sergey 的注释,您可以进行线程化,但这只能通过HTML Worker进行,所以,我建议您以有效的方式处理大量数据.
要显示数据,必须使用诸如Table之类的控件或其他控件.
因此,不要一次获取所有数据并填充表.而是通过实现自定义分页或其他方法将数据量缩小为少量.

还可以对您发出的请求使用 jQuery Ajax ,以便更快地检索数据.
As Sergey comments, you can do threading, but that can be only be possible through HTML Worker, so, I would suggest you to handle large amount of Data in a effective way.
To show the data, you must be using some controls like Table or something.
So, don''t fetch all the Data at once and populate the Table. Rather narrow down the amount of data into small number by implementing Custom Paging or something.

Also use jQuery Ajax for the requests you make so that the Data retrieval will be quicker.


这篇关于javascript线程化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆