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.

Hot reloading extremely slow. Goes through every iteration only when page is viewed.

See original GitHub issue

Bug report

It used to be that when you made a code change, the page would hot-reload in the background and I’d barely be able to switch to my browser before the page was re-rendered.

However with Next: 9.2.0 when I make let’s say 100 keystroke changes. in. my app doesn’t automatically re-render in the background. Instead, it waits till I navigate to my browser and then it will re-render 100 times, 1 at a time and wait for it to finish.

For example, if I’m just changing the text in a <p> tag a few times and I go to my localhost:3000 I will see every keystroke change I did render 1 by 1.

It takes forever to wait for and is extremely inefficient. I get the arguable appeal of not re-rendering in the background. But I have absolutely no need for 99% of these re-renders. I just want to see what the current state it. Not see how it changed with every single keystroke I did editing my app.

I assume this must be a bug???

Additional context

  • OS: macOs (2016 Macbook Pro)
  • Browser: Google Chrome
  • Version of Next.js: 9.2.0

I’m not using Typescript so it’s not due to Typechecking or the Fork typescript provider.

I believe this started happening when I updated form next 8.x to 9.x

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
madsfaerchcommented, Feb 26, 2020

@MarkLyck just to confirm, is this the issue you’re describing?

  1. Have Next project open in a tab with next dev active
  2. Focus a different tab
  3. Make several code changes, resulting in recompilations
  4. Focus browser
  5. Focus tab with Next project
  6. Observe all the changes applied sequentially

next-hmr

3reactions
timneutkenscommented, Feb 26, 2020

@madsfaerch if those are the definitive steps to reproduce that’s all we’ll need 👍 Will have someone investigate if we can improve it 💯 Thanks for providing really clear what you were seeing, it really helps a lot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

refresh html div ONLY ONCE without make very slow the page
Using setTimeout in this way avoids the problem of having callbacks executed in parallel as the next iteration is only scheduled to start ......
Read more >
Lightning experience page rendering is slow
Been there, done that. The practice shows that XHR is only a tiny bit of the page load performance, the biggest part is...
Read more >
Hot Reload is EXTREMELY slow (ASP.NET Core 6)
Same here. It's so slow I just close the app and rebuild/start it. Even changing one like of a razor view takes about...
Read more >
Slow build and hot reloading #133 - wesbos/master-gatsby
On my iMac running macos Big Sur, the build step for the simplest possible index.js as described in Module 2 Step 4 Pages...
Read more >
Reloading Script Assemblies takes a long time, and keeps ...
On 2020.2.21f on Windows, and Reloading Script Assemblies happens every time I compile, and is now taking 40 seconds each time. With script....
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