MacOS – Safari 8.0 – 9.0 100% Cpu usage OSX 10.11.3 might be related to bookmarks / favorites

bookmarksicloudmacossafari

I'm experiencing very weird issue as far I remember from Yosemite up to latest El Capitan 10.11.3 (15D21) and Safari Version 9.0.3 (11601.4.4) Actually it's started to become more annoying with time. Sometimes Safari goes up to 100% cpu usage, sometimes even more, but it's directly on safari process, all child processes stay at normal cpu usage including networking thread. I have started to debugging issue as far I can with closed source. I have tried to delete all cache,cookies,bookmarks and all possible data stored in relation to Safari.app including browsing and other databases. It didn't help much. I have created new test account on my macbook pro, then tried to reproduce issue with plain-set osx with safari, but after hours of usage couldn't reproduce the issue. Then I have imported Bookmarks.plist from my current account into cleanly set account, after less then 15 minutes, safari went up to 100% cpu usage again. I have also tried to use iCloud to automatically migrate safari data incase I have made mistake with manual transfer, but it seems icloud safari backup also made problem come back. My bookmarks seems normal, nothing to share here, few pages stored in favorites, one sub-directory in favorites, and couple more in bookmarks but more importantly plist file format does not seems to be corrupted itself. I couldn't find that issue is related strictly to one website, it seems it might be related to Favorites bookmarks. Does anyone have and workaround on this issue?

PS. I don't have any problems with other browser, such as Opera,Chrome,Firefox – but using other browser it's not the solution. If that might be helpful I have took part in developer preview beta program during Yosemite, I have went back to normal release with first public Yosemite release, but I don't really think this is source of the problem.

Safari process sample before 100% load

Screenshot with highlighted 100% usage of safari mother-process
Screenshot with highlighted 100% usage of safari mother-process

Best Answer

Actually i have found solution of this issue. It seems apple didn't handled unusual cases with new Favorites tab introduced in Yosemite as far as i remember - but this is actually easy to predict, shame on you apple.

I have quite a lot pages in bookmarks (old styled, dropdown menu), and favorites tab, in favorites i have subdirectory with bitcoin exchanges. Some of those exchanges use cloudflare to prevent ddos attacks, and form time to time ask for captcha verification. It seems each time user click on URL Field in safari, favorites bookmarks appear, and safari try to download icons and maybe other meta data for each page, and then in case unusual response, it stucks safari and waste cpu on creating many threads for nothing, im not sure if it actually retry and try download again or it's strictly connected to processing downloaded metadata from page but it just make uncountable number of threads and block cpu with junk calculations. Im not exactly sure if it's caused by cloudflare check or by any other corrupted response. But finally i have moved all bitcoin exchanges subdirectory do old styled bookmarks, where obviously metadata or/and image is not being downloaded.

In case someone will need to fix it, just monitor bookmarks and safari cpu usage, and remove one by one from favorites, restart safari, and again until eliminate issue.