javascript - Will turning on setInterval in the browser consume performance?
给我你的怀抱
给我你的怀抱 2017-05-19 10:15:16
0
4
854

Will turning on setInterval in the browser consume performance? What are the browser and webview scenarios like?

给我你的怀抱
给我你的怀抱

reply all(4)
漂亮男人

Remember clearInterval when not in use

黄舟

This performance consumption generally has no impact. However, it is quite unpleasant that setInterval has errors. It is recommended to use setTimeout recursion as much as possible.

巴扎黑

setInterval alone does not consume much. The key is whether there are any expensive operations after the scheduled trigger. To be on the safe side, you should clear it after use.

巴扎黑

This depends on what you use setInterval for! If you just do some simple operations and nothing happens, and if you keep requesting the interface, the performance will definitely not be very good. Just like what I said on the first floor, remember to clear it if you don’t need it!
WebView (network view) can load and display web pages and can be regarded as a browser. It uses the WebKit rendering engine to load and display web pages.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template