Make Cargo & Rust Analyzer Nice to Keep Your Machine Snappy
positron.solutions·11h·
Discuss: r/rust
Flag this post

Building Nicely With Rust And Nix

This will help Rust or Nix users push their CPU heavy processes to the back of the line, keeping machines snappy even under heavy load. If your OS doesn’t know which processes need priority CPU, builds and language servers etc might take all of it.

Context: Burning Up At Launch

Around the launch of the PrizeForge MVP, my machine was beginning to grind to a halt in ways that were beginning make it worth it to drop what I was doing. There was a lot going on:

  • Nix builds of containers
  • The backend was occasionally rebuilding the Stripe crate
  • Cargo Leptos rebuilds after updating watched files
  • Rust Analyzer running SQLX macros that query Postgres

My machine isn’t bad. It’s amazing by 2018 standards. The problem is that when all of…

Similar Posts

Loading similar posts...