<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span style="font-family: SFUIText-Regular;" class="">Hi all,</span><div class="" style="font-family: SFUIText-Regular;"><br class=""></div><div class="" style="font-family: SFUIText-Regular;">In the Safari shipped with the latest macOS Sierra beta, as well as Safari Tech Preview 9, there's an odd CPU usage issue with individual tab's web processes.</div><div class="" style="font-family: SFUIText-Regular;"><br class=""></div><div class="" style="font-family: SFUIText-Regular;">For example, if one navigates to&nbsp;<a href="http://huffingtonpost.com" class="">huffingtonpost.com</a>, Activity Monitor will show the tab web process continually using 5-10% of CPU, along with hundreds of idle wake-ups. Even more concerning, this continues to happen with the&nbsp;<a href="http://huffingtonpost.com" class="">huffingtonpost.com</a>&nbsp;web process&nbsp;even if one picks another tab in the window.</div><div class="" style="font-family: SFUIText-Regular;"><br class=""></div><div class="" style="font-family: SFUIText-Regular;">Here's a screenshot from Activity Monitor; one Safari window is open. It has two tabs:&nbsp;<a href="http://polymail.io" class="">polymail.io</a>, and&nbsp;<a href="about:blank" class="">about:blank</a>.&nbsp;<a href="about:blank" class="">about:blank</a>&nbsp;is the one currently in focus.</div><div class="" style="font-family: SFUIText-Regular;"><br class=""></div><div class="" style="font-family: SFUIText-Regular;"><img apple-inline="yes" id="EF075E17-9B38-452F-83EC-8A1F8ADF0AF2" height="960" width="1280" apple-width="yes" apple-height="yes" class="" src="cid:9074EAB7-9294-4BA1-8ABF-838C4A9837B1@DELOSENT.COM"></div><div class="" style="font-family: SFUIText-Regular;"><br class=""></div><div class="" style="font-family: SFUIText-Regular;">To investigate, I opened Web Inspector and recorded the JS/event timeline. I found that there were timers firing quite frequently.</div><div class="" style="font-family: SFUIText-Regular;"><br class=""></div><div class="" style="font-family: SFUIText-Regular;">Now, I know Safari/WebKit&nbsp;<i class="">should</i>&nbsp;be throttling timers of background tabs&nbsp;<b class="">anyway</b>, but I figured I'd `clearInterval` all the timers to see if that reduces the CPU usage. Nope (even though I verified no timers are firing any longer after clearing all the intervals — no activity on the timeline whatsoever; CPU usage and idle wake ups still way too high).</div><div class="" style="font-family: SFUIText-Regular;"><br class=""></div><div class="" style="font-family: SFUIText-Regular;">This doesn't happen with *every* page, but it happens with most that are reasonably complex (can't tell what the trigger is yet; perhaps the use of JavaScript timers?)</div><div class="" style="font-family: SFUIText-Regular;"><br class=""></div><div class="" style="font-family: SFUIText-Regular;">The previous Sierra beta's Safari and Tech Preview 8 both showed this problem. I don't know whether it goes further back.</div><div class="" style="font-family: SFUIText-Regular;"><br class=""></div><div class="" style="font-family: SFUIText-Regular;">Any ideas what's going on? Is this 'expected behavior' and I'm missing something obvious?</div><div class="" style="font-family: SFUIText-Regular;"><br class=""></div><div class="" style="font-family: SFUIText-Regular;">Thanks,</div><div class="" style="font-family: SFUIText-Regular;">Chris</div></body></html>