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.

Endless number of awaits with 100% CPU usage on first load of Routify app

See original GitHub issue

When I first open my app on a new domain (or in an incognito tab), the browser tab freezes with 100% CPU usage. If I force close the tab and open it again, everything works as normal: very strange.

If I pause execution while this is happening, it looks like there is some sort of infinite number of waiting promises, or infinite recursion happening. Here is what the call stack looks like:

image

And here are the relevant functions that are getting called repeatedly. First, pushstate:

image

then updatePage:

image

and finally preload():

image

version Routify 2.12.7 with Svelte 3.32.1.

Again, this only happens on the first load, not subsequent ones.

@jakobrosenberg: happy to add this to our next live debugging session 😁

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jakobrosenbergcommented, Mar 16, 2021

This should hopefully be fixed now. Thanks for the help on this one @mizzao and @lamualfa.

1reaction
jakobrosenbergcommented, Mar 16, 2021

Thanks for the repro @lamualfa . I’m trying to crack this one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CPU Usage Stuck between 80%-100% without any apps ...
I need help 5 hours ago, my laptop suddenly had it's cpu utilization/usage ramped up to 80%-100% and throttling the temperature to 93°...
Read more >
You may be massively overpaying for your CPUs
First, if your application has inelastic performance (has high CPU hangs when the CPU usage goes to moderate or high), you may be...
Read more >
SW is reporting servers memory/cpu always hits 100 ...
Is this normal? It's not a consistent 100% utilization. It more so seems like I get hammered with alerts at least 1 once...
Read more >
Infinite Loops Are Chewing up Your CPU!
An infinite loop causes unexpected consumption of resources, such as CPU or memory. It could take CPU usage to near 100% and hinder...
Read more >
Why I wouldn't recommend Svelte JS to a fellow CTO
Yes you can get svelte and sveltekit to build jamstack-compatible apps but I've done it and it takes too many workarounds.
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