Remix is hogging Macbook Air
See original GitHub issueWhat version of Remix are you using?
1.4.3
Steps to Reproduce
We’re migrating a small Next.js project to Remix. I’m using MacBook Air M1 2020 model to code Remix with barebones template starter using Cloudflare workers.
However, the moment I start the dev server with yarn dev
, miniflare boots up and within a few minutes of coding Remix, the laptop gets extremely hogged. There’s a noticeable drop in performance until and unless I kill the remix server. The moment the remix server is killed, everything is back to normal.
This is what happens to esbuild
process anytime there is a small file change. It stays at 100-200% usage for 5-10 seconds, and then drops down to 60%.


In this whole process, coding on VSCode is impossible. The laptop is extremely laggy and I have to, unfortunately, shut down the Remix server to code, and then start to check output, then immediately shut down the server again because it makes M1 highly unresponsive.
Any idea how this can be debugged further?
Expected Behavior
Remix/esbuild should be smooth
Actual Behavior
Extremely slow and bad DX with Remix on macbook m1, even on small project
Issue Analytics
- State:
- Created a year ago
- Reactions:7
- Comments:9 (5 by maintainers)
So, this whole issue seems to be caused by #2432.
All the old build
*.css
and*.js
files cause wrangler to bog down and CPU utilization to skyrocket.While in development, manually deleting previous build files after each change causes CPU utilization to drop back down to a normal 😢 20 to 25%. That’s pretty lousy but it’s much better than 120%+!
Now that
exit-hook
is updated to support async, I’ll see if I can submit a PR for it.UPDATE:
Since
exit-hook
is ESM, getting it to work with Remix is beyond my skillset. There are several discussions about using dynamic imports. However, I can’t figure out how to make it work with and compile into Remix.Anyone up for this challenge?