Netbeans crashing on macOS

For the past few years & months, Netbeans (now version 20) has been really struggling to keep up with the type of work that I most frequently use it for (helping to maintain & improve WordPress and a few hundred plugins here or there) and it has really been a bummer because no matter how hard I’ve tried I have not felt any joy when writing PHP in VSCode – only frustration.

Whenever I would launch Netbeans, it would open fine, and open projects & directories mostly OK, but then some other days & times it just felt far-far-far more sluggish than it used to (and than it should, given the relatively monster machine I am running it on).

Like one does, I wasted a lot of time trying a bunch of things I found on The Internet that did nothing measurable; switched JDK versions, hard-coded a reserved amount of memory for the JVM, reinstalled, safe-mode, ask nicely, yada yada yada…

The magic bullet, though, for me, harkens back to an old blog post of mine about not allowing macOS to index your node_modules directories.

By adding |node_modules to Netbeans’ regular expression of “Files ignored by the IDE” it not only stopped crashing, but I am certain that I reduced the volume of indexing work it was doing by several ga’thousand percent, as every WordPress plugin is likely to have several megabytes of “modules” that are only used for tooling during its development and basically useless when it comes to day-to-day coding.

Netbeans is the best hammer I never paid for. As soon as I stopped asking my hammer to write a bunch of notes for me that I’d never read anyways, I was able to pound nails again.

Moral of the story? If there is one, I guess it must be: “John you are handsome & wise & always right and you should stop doubting yourself” 🙌