-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remix is hogging Macbook Air #3123
Comments
I took the "Remix dev" barebones starter and everything is absolutely fine for me; all rebuilds take at most 40ms and memory/cpu is incredibly low and stable. Looking at the screenshot you've provided, it doesn't seem to be one of the starters? |
That's surprising because I know the core Remix team all use M1 Macs. I see you're on 1.4.3. Have you tried the latest 1.5.1? What about node version, etc. I'm sure they would appreciate as much details as possible about your system. |
I think the issue could be wrangler/miniflare, I had a similar (not that slow) issue with Vercel CLI, the app took almost a second to rebuild, once I switched to stop using the Vercel CLI and use |
@mehulmpt Did you ever resolve this problem? I'm seeing something similar. Just running When I run with Remix, Tailwind, and Wrangler I'm seeing 50-60% CPU utilization before making changes to my code. As soon as I change a tailwind class, I jump up and stay well over 120% CPU utilization. It's just becoming unbearable to work. I've asked about the wrangler issue in their Discord and am waiting on feedback. I'm not sure if the Remix/Tailwind stuff is a separate problem or just the wrangler issue compounding with the additional processes running. |
No @justinnoel, unfortunately for our use case remix was extremely hard to migrate to. We spent about a couple of weeks trying really hard to fix a lot of underlying performance/compatibility issues but then eventually gave up. I wrote a blog post in June highlighting our frustrations with remix + cloudflare stack, maybe a lot of things are now fixed but we're not willing to try moving to remix again https://codedamn.com/news/remix/do-not-use-remix |
@mehulmpt Sorry you had a bad experience with Remix, but you seem to be the outlier, and not the norm as many developers have had a great experience with Remix. I use Cloudflare Workers (not Pages), and wrangler/miniflare is working fine for me. @justinnoel When you save a route file with Tailwind classes, tailwind will rescan the content and regenerate the CSS file. However, this can result in double-builds. One, when Remix detects the change when you save the initial route file. Then the second one when tailwind changes the CSS file. If you're having slow builds, then this simply compounds the issue. For most people, Remix esbuild is very fast, 50-200ms. Definitely sub-second builds. As @sergiodxa mentions, it may be an issue with the Cloudflare tooling. I understand the frustration you may have, as ultimately you need to be able to build your product and any friction just gets in the way. I hope that when you have the opportunity, you give Remix another chance. Good luck with your project! |
@kiliman Thanks for the response. I love Remix & Cloudflare; so, I won't be moving on! I was just hoping mehulmpt had discovered a solution in the meantime. This issue just cropped up recently and am pretty sure it's due to Cloudflare wrangler. I was also digging into the Tailwind issue and wondering if I can overcome that double build issue. If I find a fix, I'll explain it here to help out any people with the issue in the future. |
So, this whole issue seems to be caused by #2432. All the old build 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 |
UPDATE:
Since Anyone up for this challenge? |
Fixed by #5223 |
## Description 1. What is this PR about (link the issue and add a short description) Seems like this killed my dev expierence remix-run/remix#3123 Fixed in 1.12 gonna try, as otherwise I have 100% cpu load, and need to stop `pnpm dev` before any changes ## Steps for reproduction 1. click button 2. expect xyz ## Code Review - [ ] hi @kof, I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 5de6) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env.example` and the `designer/env-check.js` if mandatory
## Description 1. What is this PR about (link the issue and add a short description) Seems like this killed my dev expierence remix-run/remix#3123 Fixed in 1.12 gonna try, as otherwise I have 100% cpu load, and need to stop `pnpm dev` before any changes ## Steps for reproduction 1. click button 2. expect xyz ## Code Review - [ ] hi @kof, I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 5de6) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env.example` and the `designer/env-check.js` if mandatory
What 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
The text was updated successfully, but these errors were encountered: