Is there a way to set nice/priority on a cmake build?

I’ve been working on a few different ESPHome based devices and with recent updates I’ve had to clean and rebuild a few devices. I’ve found that while building, the rest of HA slows to a crawl. As soon as the ESPHome build is done, it’s all good.

Is there a way to set the nice priority of a build? Or maybe limit the number of cores it’s using? If I had this as a standalone environment, I could just use nice 20 cmake ... or specify -j4 to limit core use. But via the Device Builder plugin, I’m not seeing any configuration option to do this, or to pass settings down to the build environment (which is a docker container?) Maybe some hidden YAML config I can set?

I don’t mind a rebuild taking a bit longer if it means my entire house doesn’t take 6+ seconds for lights to turn on when I walk into a dark room.

compile_process_limit (Optional, int): The maximum number of simultaneous compile processes to run. Defaults to the number of cores of the CPU which is also the maximum you can set.

Hidden in the first search result:

The second result for me links to this community :point_down:

What hardware are you using?

I appreciate the assist. That is exactly the setting I was looking for. Thank you.

But maybe reconsider the attitude in the future. It’s replies like yours that see people shy away from these “community” forums.

Yeah, knowing the answer now, it seems obvious what to search for. But not knowing the answer, I goggled several terms like esphome nice setting, esphome cmake limit, and esphome job priority, which show entirely different search results. That last one did pull up the page you pointed to, several links down, after several videos and the ESPHome “start here” page. That page talks about installing the integration, and configuring your first sensor in YAML, but there’s nothing that points to how to adjust settings for the builder.

I went from there to the main page. There’s tons of great documentation, but it’s all organized around the component libraries. I searched there for builder, and got pages I’d already seen. But again, no pointer to that core page. Know anyone over there? Maybe they should look at that.

I’d have never guessed “ESPHome Core” would have settings for the builder. There are over 30 “core” pages, which all appear to be related to library configuration (Sensor Core, Network Core, OTA Core, Touchscreen Core, etc). I figured “ESPHome Core” would be settings for chipset variants, like flash/ram sizes, gpio layout, clock settings, and the like (which is also is, apparently).

Anyway… When you’re super familiar with a project, it’s easy to think people are just dumb or lazy for not knowing something “obvious”. Instead of talking down to newcomers, maybe ask what they tried to search for, or how things could have been more intuitive. That may see improvements that could bolster the community, instead of driving people away.