Skip to main content
Penyaskito Blog

Main navigation

  • Home
Language switcher
  • English
  • Español
User account menu
  • Log in

Breadcrumb

  1. Home

Optimizing PhpStorm when it's slow or hangs

By penyaskito, 14 April, 2025
PhpStorm IDE icon

I've been struggling lately with PhpStorm IDE, specially when closing a big project and opening another big one, where sometimes it just hanged (if you are doing Drupal, any Drupal project might fall in this category given the amount of files).

After checking settings, I found out that I had the defaults, while my computer has 32Gb of RAM. 

If you want to play around with the options to see if it improves your experience, go to Help > Edit custom VM options....

It will open phpstorm64.exe.vmoptions where you can customize the VM options. It's important that you save the location of this file, as if your experimenting breaks PhpStorm, you want to be able to edit this outside of it.

I ended up with

-Xms4G
-Xmx8G
-Dawt.useSystemAAFontSettings=lcd
-Dawt.java2d.opengl=true
-XX:ReservedCodeCacheSize=1G
-XX:+AggressiveOpts
-XX:+UseFastAccessorMethods
-XX:+UseStringCache
-XX:+UseCompressedOops
-XX:+UseCompressedStrings

and so far looks like it's working better.

UPDATE: das-peter pointed out about ulimit too for allowed open files. I remember having set up that before because my hard ulimit command inside WSL2 shows:

$ ulimit -H -n
1048576

You can set that with 

$ ulimit -n 1048576

Tags

  • php
  • phpstorm

Comments

The content of this field is kept private and will not be shown publicly.
About text formats

Plain text

  • No HTML tags allowed.
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.

Monthly archive

  • April 2025 (1)
  • July 2023 (1)
  • December 2021 (1)
  • May 2021 (2)
  • April 2021 (1)
  • September 2014 (1)
  • November 2012 (1)
  • September 2012 (2)
  • August 2012 (3)
  • June 2012 (6)

Recent content

Optimizing PhpStorm when it's slow or hangs
1 month 2 weeks ago
Introducing The Dashboard Initiative
1 year 10 months ago
Rewriting history on a git repository for editing author and email on past commits
3 years 4 months ago

Recent comments

I would recommend taking a…
1 year 9 months ago
This looks interesting
1 year 9 months ago
Thanks for the comment
4 years ago

Blogs I follow

  • Mateu Aguiló "e0ipso"
  • Gábor Hojtsy
  • Pedro Cambra
  • The Russian Lullaby, davidjguru
  • Can It Be All So Simple
  • Maria Arias de Reyna "Délawen"
  • Matt Glaman
  • Daniel Wehner
  • Jacob Rockowitz
  • Wim Leers
  • Dries Buytaert
Syndicate

Footer

  • Drupal.org
  • LinkedIn
  • GitHub
  • Mastodon
  • Twitter
Powered by Drupal