question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remix is hogging Macbook Air

See original GitHub issue

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%.

Screenshot 2022-05-07 at 4 12 24 PM Screenshot 2022-05-07 at 4 12 10 PM

Screenshot 2022-05-07 at 4 16 07 PM

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:open
  • Created a year ago
  • Reactions:7
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
justinnoelcommented, Sep 30, 2022

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.

0reactions
justinnoelcommented, Oct 1, 2022

UPDATE:

Now that exit-hook is updated to support async, I’ll see if I can submit a PR for it.

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

5 essential settings for DJ's using a MacBook! - YouTube
If you're using your MacBook to DJ it's a good idea to get your machine as optimised as possible to maximise performance.
Read more >
MacBook Air (M2, 2022) - Technical Specifications
One external display with up to 6K resolution at 60Hz. Thunderbolt 3 digital video output. Native DisplayPort output over USB‑C; VGA, HDMI, DVI, ......
Read more >
Mixing in GarageBand on Mac - Apple Support
When you mix a project, you balance the different parts and blend them into a ... Create changes over time using automation curves...
Read more >
GarageBand for Mac - Apple
GarageBand for Mac has everything you need to learn, play, record, mix, ... Drummer, the virtual session player created using the industry's top...
Read more >
Audio Editor in GarageBand on Mac - Apple Support
The Audio Editor displays the audio waveform of the regions on an audio track. You can copy, paste, move, trim, split, and join...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found