Will turning on setInterval in the browser consume performance? What are the browser and webview scenarios like?
黄舟2017-05-19 10:17:16
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.
巴扎黑2017-05-19 10:17:16
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.
巴扎黑2017-05-19 10:17:16
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.