Extreme lag and high CPU usage on OSX High Sierra Follow
Today I upgraded from OSX Sierra to High Sierra. Everything ran smoothly, until I opened PhpStorm. Suddenly, the system started lagging badly. Switching tasks between PhpStorm and other apps (Chrome) took 2-3 seconds. Switching between editors inside PhpStorm took 1-2 seconds.
I noticed, that the CPU usage of PhpStorm went up to 50%-80%, when moving the cursor in PhpStorm or when switching between editor windows. Indexing a project completely freezed the system with a CPU usage of 600%.
Then I uninstalled JAVA and JAVA SDK and rebooted. Suddenly everything ran fine, even in PhpStorm.
But now I have PhpStorm (EAP 2017.3 Build #PS-173.3531.17) open for almost an hour, and the lag when switching tasks/editors starts to appear again. It's almost impossible to work.
I also tried PhpStorm 2017.2, but same problem there.
Any ideas how to fix this?
Please sign in to leave a comment.
TL;DR: Try to override default font to native internal SanFrancisco font, named .SF NS Text
I believe this issue is somehow related to Java font rendering in newer OS X versions. Actually, I had exactly the same issue with XMind app (it uses Eclipse under the hood) - at some moment, even small (<20 elements) mind map rendering started to lag entire OS. And the solution in my case was the same - just using system-native font, which is now SanFrancisco family SFUIText.
Hope it helps to somebody.
I had this issue, and it was all related to my 4K monitor. I noticed when i went to work and used my 1080p monitor, all was fine, when i would come back home and hook up to my 4k monitor, everything went to hell. Finally I read somewhere, maybe even this post, that if you lower the resolution it corrects it. I corrected my issue by going to Settings -> Displays, Select scaled and select the second from the largest resolution, though i hate losing the screen resolution, at least i can work now.
my external monitor is not a 4K monitor and connected via HDMI cable. at 1080p resolution and this occurs for me. It seems less often as when I first upgraded to High Sierra. But I am also now trying to not open as many concurrent applications as before. I am going to try the changing the font to see if that helps.
Finding the same issue. this issues is a nightmare. Needs to be escalated.
The same. My videocard is Intel Iris 5200 Pro. Macbook Pro (11,4) (15-inch, 2015 Mid). What is yours guys?
@Salnykov Dv, thanks! It seems to have worked perfectly. Radeon Pro 460 / MacBook Pro (13,3) (15-inch, 2016)
@Salnykov Dv Solved my problem
None of the solutions on this ticket has helped me at all. Last week I had my laptop running overnight and next day looking at my Activity Monitor app, the WindowServer process was using 85GB of memory. YEP, you read that correct 85GB on my 16GB 2013 MacBook Pro. I then searched for stuff on WindowServer process taking up too much memory and there are lots of stuff out there about this occurring on High Sierra, and that 10.13.1 was supposed to have fixed it, but I have 10.13.3 and it must have come back. And I really think this is the issue here. That while IJ and its products are helping display that issue, it really is a Mac OS bug that needs to be fixed.
Only current work-around is to reboot your machine or close big memory hogs like Chrome, Jasper Reports, IJ and restart them up. Or if second monitor to disconnect the monitor and reconnect. Those might help bring your machine back to running. But not a final solution.
No idea if this will help anyone else but I found what appears to be the cause of my issue today. I had been running without even realising the .gitignore plugin and after disabling it because of other issues I haven't had any problems.
For me what fixed this awful problem was:
In chrome browser, preferences, disable "Use hardware acceleration when available". Then my mac was usable again.
Nothing to do with phpstrom, but it was indeed mostly visible with phpstorm.
More generally, it looks like if the mac switch from the intel graphic card to use the nvidia graphic card, then it goes bad.
There is some conflict between NVIDIA GeForce GT 750M and High Sierra and IDEA products and possibly 4k monitors, although it might be more general than that from what I've read here. Personally I tried everything I could think of -- running in low-res mode, installing the new NVIDIA drivers, trying different monitors, and I still couldn't stand the choppiness. As a programmer, it doesn't look like a performance issue to me. The hitching feels more like a thread deadlock issue at a very low level.
Personally, I gave up. I reformatted my hard drive and reinstalled the old Sierra. Everything is back to smooth and fast, like the Mac I remember. It sucks, and it took 3 full days to get all my data and apps reinstalled and configured, but at least I didn't have to spend $3,400 on a new Mac. I stopped using IDEA products -- I felt too annoyed by their lack of support and non-existent development response on this issue -- but maybe I'll go back to them after I get over it emotionally.
I too ended up removing High Sierra and reinstalling Sierra. Everything is nice and fast now. 2014 MacBook Pro Retina NVIDIA GeForce GT 750M with 4k external display. I believe it to be an Apple/Nvidia apathy issue. They are just waiting for everyone to upgrade to a new MacBook Pro. Every few days when the "upgrade to High Sierra" message pops up, it is like a taunt. Thanks for nothing Tim Cook.
I (sadly) just upgraded to High Sierra after a colleague reported no quirks. However, I found that RubyMine goes to 750+% CPU usage as soon as I touch a .vue file in the IDE. Possibly this has something to do with the syntax markup for this and similar sorts of files?
Shortly after I select another file tab for a .rb, .js, or .erb file for example, the system settles back down to normal.
Otherwise I can barely type anything at all. Hope this is a clue.
Late 2013 MBP 16GB/512GB SSD with 4K HDMI monitor
Vineelshah, I feel the same, it is very frustrating. But after my first post, and then doing more research, it is an Apple OSX issue, that also occurs to me with Jasper Reports and other Java apps, especially Java UI apps. So until Apple fixes it, we can't expect Jetbrains to be able to fix it because it isn't caused by their code.
Applied the palliative from Salnykov Dv but it only allowed about 30-45 seconds editing before tanking. Moving to a different tab of a different file type soon enough avoids going unusable for a time, but clearly still impractical, because not exiting quickly enough requires killing RM.
The reason I moved to High Sierra in the first place was performance problems since I started editing and working with .vue files. I believe this problem already exists in Sierra, but not to the same debilitating degree. No doubt High Sierra is worse, but there was already a problem IMHO.
it seems to Salnicov DV`s solution works
I also am getting super laggy performance. All other apps work fine, even other IDE's (tried Visual Studio Code / Sublime / Atom all work great). Sucks, cause I love using this editor, but its just not going to work out if we cant find a solution.
I disabled all plugins as well.
Update : I installed an old version of nvidia graphics drivers, and it fixed the issue, try downgrading your drivers
I am using :
Steps mentioned in https://youtrack.jetbrains.com/issue/WI-38586#comment=27-2534998 works :)
One thing I've noticed with phpStorm since many years back is that the autocomplete functionality in many cases seems to use A LOT of resources.. I have a brand new mac book pro (best model) and though this would go away once I had this new computer but, yesterday I had to force reboot it twice because it hanged beyond being able to do anything for 5 minutes..
Also the weird "preview on the scrollbar" used to hang up my old computer most of the time..
Using MacOS in multiple JetBrains IDEs I was having lag issues. Slow typing, switching files, etc. After looking through forums I found: https://plugins.jetbrains.com/plugin/9195-jb-sdk-bintray-downloader. Installed the plugin and after restart performance is now smooth.
Try to update your NVidia driver to the latest 318.104.22.168.35.106 from NVidia page: http://www.nvidia.com/download/driverResults.aspx/134834/en-us
This worked for me, and I tried all other suggestions before without any luck.
I will wager that in another 10 years performance will still be terrible. Somehow it can never be a product or Java issue, it's always the OS that's somehow shit. I've used 5 different native IDEs/Editors with loads of plugins and autocomplete etc, and never seen them constantly run using a full CPU Core. However Intellij needs a full core and 2Gb ram. With 10 files open that is ridiculous.
It doesn't seem like this issue will ever be resolved...
The issue seems specific, or at least more noticeable on macOS for me. I have a Windows 10 machine with two 1440p monitors (no DPI scaling) and there is no lag. Intellij feels so smooth and everything is instant with low CPU impact. On my 15" 2017 MacBook Pro its runs decent with just the laptop screen. Add an external 4K monitor, start typing and CPU is between 300% to 600%. There is absolutely no reason an IDE should be fully utilizing that many cores for normal usage / coding.
I've starting developing on my Windows machine more just because the IDE experience is so much better. Its a real shame that this issue has been around so long and ruins what would otherwise be a great experience and tool for Mac users.
My testing (15" MacBook pro Retina 2014 2.8 GHz 16GB RAM) showed it to be the combination of High Sierra and a 4k external monitor. I saw other laggy behavior when watching videos in Chrome, and other apps. It was unbearable. If I didn't use the external 4k monitor, or used a lower res monitor, I had no lag at all. I downgraded to Sierra, and I have no lag even with the 4k external monitor. So it isn't necessarily the IDE at fault here. I'm still on Sierra. I figure I'll give Mojave a try when it is released, but only with a full backup I can resort to if it proves laggy, too.
For anyone experiencing this issue, I've managed to improve things greatly by modifying the scaling settings on my external display (which is a 4K). I set it to the furthest option to the right (more space), essentially telling MacOS to not scale the display at all. This makes the UI elements and fonts very small, but I just jacked up the font size in the IDE. It's not a perfect solution, but the performance is like night and day.
I recently tried Intellij IDEA 2018.2 RC build and the issue still seems to be present. The CPU range will vary from 300% to 600% just typing basically half the system cores are completely pegged.
2X 4K Samsung 28" monitors (I close the lid of my laptop so I only have 2 screens active, not 3) The resolution is set to look like 2560 X 1440 on both screens
Late 2016 Macbook Pro Retina (2.7 GHz, 16GB RAM, Randon Pro 455 2GB)
I've tried playing with different JVM settings and garbage collectors with no performance changes. I have tried a couple different monitor and resolution configurations as well. I can confirm what some others have mentioned. If I run the screens at true 4K resolution the performance does improve, but for me readability goes to hell making this an undesirable solution. I've also observed performance increases when only a single 4K monitor is connected vs two. As other have mentioned changing the Antialiasing to Greyscale or turning it off completely also improves performance.
On Windows I don't see these performance issues. I even took both my 4K monitors to my Windows machine and ran Intellij with DPI scaling on. There wasn't any impact to the performance.
I'll be curious if things improve under Mojave but I'm not going to hold my breath given how long this issue has been around.
IntelliJ IDEA 2018.2 (Ultimate Edition)
Build #IU-182.3684.101, built on July 24, 2018
JRE: 1.8.0_152-release-1248-b8 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
and this problem really got me: opening any java file and using array keys to navigate through file was extremely lagging: sometimes it took 2-4 seconds just to repaint cursor position!!!
After following https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems
I profiled CPU usage using YourKit and found out the main culprit. I believe it has something to do with DataSharing, as once I disabled it my CPU usage went back to normal.
Working with the 2018.x versions, in my setup, is impossible. Late 2014 imac 5k with High Sierra. Keyboard clicks are lost, scrolling is unstable, mouse clicks take a long time to just open a menu. Tried almost any suggestion here without any luck. I thought 2018.2 would fix things but to no avail. Now using 2017.3.6 and everything is back to normal.
Update 15 Oct 2018: Tried 2018.3 EAP (183.3647.13). All symptoms of strange behaviour are still there. So back to 2017.3.6
Update 14 Dec 2018: 2018.3.1 works as expected. No noticeable issues.
Is this ever going to be resolved? I won't accept the standard finger-pointing at the OS or other factors outside of the product. You're offering support for OS X, you're taking money from your loyal OS X users and we're expecting you to fix any problems that come up. This has been going on for so long already and it's completely unacceptable.