Sublime Forum

Unusual CPU usage while developing on Next.js

#1

Hi there,

I’m using Next.js to develop a front-end of an app. However, whenever I run the next.js dev server and begin developing, Sublime Text starts 1 or 2 extra “crawl” processes and uses upto 12% of my CPU. This causes my CPU to reach 75+ degrees instead of the normal 40.

Any idea what could be causing such high usage?

My guess it that the crawl process should be a one time thing. It should not continuously happen in the background.

0 Likes

#2

Probably because the server is touching files that are in your project, ST thinks they’ve been modified and is reindexing them.

0 Likes

#3

Is there a way I can figure out which files sublime detects as changing everytime?

0 Likes

#4

On linux you can use inotifywait -mr . from the project folder to find out which files are being changed.

0 Likes

#5

Thanks to @bschaaf’s advice, I was able to find out the culprit files and fix the issue using Sublime’s index_exclude_patterns setting.

1 Like