setInterval()对性能有害吗? [英] Is setInterval() bad for performance?

查看:115
本文介绍了setInterval()对性能有害吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在建立一个拥有大量JavaScript的网站。使用setInterval()是否会损害我网站的性能?

I am making a website which has a lot of JavaScript. Will use of setInterval() hurt the performance of my website?

推荐答案

取决于您使用它的方式和方式。如果你想异步做事,这真的很有帮助。

Depends what for you're using it and how. It can be really helpful if you want to do things asynchronously.

(看到一些代码会很高兴 - 然后我会说更多的话)

(would be really nice to see some code - then I would be able to say something more)

这篇关于setInterval()对性能有害吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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