-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High CPU usage #23
Comments
Are you on any particular website when this happens? Do you have user scripts installed? |
No user scripts, not noticed it connected to any particular website. I've nuked my local safari directories and started fresh, will monitor in case it was a local file corruption issue. |
I get this problem too, exactly as described. I do have one user script installed but it's set to only work on one site. Finally, I did a clean reinstall of MacOS about 3 weeks ago. |
This happens for me too. I suddenly have CPU usage from 95-125% and closing all tabs does not have any effect - it will go on for up to half an hour - as long as I have been able to leave Safari without having to quit and relaunch. It is definitely JS Blocker as Safari CPU drops to a more reasonable 20% as soon as it is deselected in preferences without even reloading any pages. I have tried installing the latest versions from both the Apple Extensions repository and from JS Blocker site and neither have made any difference. The only solution has been to disable JS Blocker so that the fan noise does not drive me insane. |
Will the CPU usage ever drop? Can you force the CPU usage to spike by trying this: Settings > Rules > click "Update Filter Lists"? |
I just tried that but when I did so it said that the rules had been updated just over a day ago anyway. I just left my MBP for ten minutes (before doing the above) and came back to my fans screaming and Safari (with no open windows) fighting with kernel_task for CPU (~100% each) and only 200MB of 8GB of RAM free. I couldn't even get the extensions pane in Safari to show - just SBBoD and as soon as I quit Safari, kernel_task CPU dropped to about 5%. I'm not saying that this incident was down to JS Blocker but other than not being able to access the Extensions pane in Safari preferences to do so, it fits the pattern, i.e. Safari with no windows open hogs CPU until JS Blocker is disabled. |
Does the issue persists with a clean install of JSB? That is, restore to default settings by opening the Settings menu and clicking Restore Defaults twice. You can create a backup from that same menu. If possible, it could be helpful if you posted your backup so I can run JSB using your exact settings (and rules, if you allow it). |
Here is my backup. As you will see, I have only added my own rules on two sites - one was twitter.com as it was causing ballistic CPU usage whenever I scrolled very far down the page and the other was tpb.tw which was doing the same using a coin mining script. In both cases, JS Blocker successfully solved these problems. |
The next update will disable compression, which could be a cause of the CPU spikes. If you'd like to test it now, I've included it here. Edit: This version also includes the ability to see how long it takes JSB to save certain data. To see it, turn on debug mode from Menu > Console. After a while, messages will start appearing there. |
It's installed. I'll report back in a days or so. |
Er, all I can say is that it is different. I'm not getting the CPU spikes but everything is much slower. If I am entering text on Twitter, I am typing about 5-10 characters ahead of them appearing on screen and nearly all pages are loading slowly. I restart Safari with JS Blocker enabled and there is no change. Disable JS Blocker and everything returns to normal speed. Quite frustrating. |
Are you seeing CPU spikes while typing that disappear once you stop? I'm not seeing any issues using your backup myself so I have no idea what could be wrong. Are there any useful log messages in Safari's web console while on twitter? |
I just rebooted my Mac and I'm having a relatively quiet CPU period but I will monitor the Twitter activity. |
Hey, how is progress with this issue? I've stopped using the extension due to the cpu spikes. Would be good to know if it's fixed yet. |
The latest update, 5.3.0, disabled compression which should help with cpu usage. It's difficult for me to test personally as I've not had any problems even with compression on.
… On Jan 4, 2018, at 6:16 AM, Mark Wadham ***@***.***> wrote:
Hey, how is progress with this issue? I've stopped using the extension due to the cpu spikes. Would be good to know if it's fixed yet.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Ok i've installed it, will keep an eye and report back in a week or so. |
Still having the problem so have disabled the extension again. It would be good to get to the bottom of this. |
I too frequently get the 100% CPU usage with JSBlocker enabled. Running High Sierra and a clean JSB. |
I'm also seeing the CPU issue on High Sierra 10.13.4, but in my case it's caused by a massive memory usage, and subsequently the CPU is busy writing RAM to the SSD. |
@infernoboy it would be nice to see some progress on this as i frequently wish i had a selectable javascript blocker but i can't have an extension eating all my cpu. is there any way we can capture some debug logs for you to debug this? |
Unfortunately there hasn't been much improvement here. It happens maybe twice a month for me and by the time I catch it, Safari is unusable and I can't diagnose what's going on. There isn't enough debug code to catch something like this. Safari spin dumps are unhelpful. |
In the past weeks I've been seeing the excessive memory (and cpu-load caused by swapping) on a daily basis. Three tabs are usually open all the time: Heroku Dashboard, Scoutapp and New Relic. Whoever has logins with any of these webapps, might want to test if they can reproduce the issue. |
@maia presumably you're allowing those webapps to run javascript, i wonder if there's some kind of overhead that jsblocker introduces when scripts are allowed to run. |
Oh, I just looked at the source code. This entire extension is implemented in javascript, no wonder it's slow! |
I've reinstalled the extension, going to try running it with everything disabled except for script blocking. Hopefully the cpu issue is buried somewhere in the extra features that I don't really care about. Will post back here after a while with results. |
I have exactly the same problem as people here. The newest version of an extension (5.3.1), Safari Version 11.1.2 (13605.3.8). Had to uninstall JS Block because every few pages CPU went 100%. I am not able to reproduce it on a specific page though :/ |
Pretty disappointing that this has been open since November with no progress at all. |
Those kind of problems are very hard to reproduce. The more info we provide here, the easier it will be to fix. Let's hope that @infernoboy will be able to identify the root cause. |
It happens for me from time to time whenever my computer wakes up. I usually restart Safari and it helps. Next time it happens to me again, I will try to capture some details. |
I occasionally see Safari using 100% CPU continuously. Looking in activity monitor there is one single safari tab causing the load, all of them show around 0-5%, yet Safari itself is using 100%.
When this is happening if I disable the extension the cpu load drops immediately.
The text was updated successfully, but these errors were encountered: