Help with diagnosing and fixing a 10+ second hung process in Nuxt
Hi all, I'm having an issue where a stuck process in some of the Nuxt generated code is causing my site to lag for 10-15 seconds. This happens when I attempt to navigate to a page using the Vuetify
:to
prop. It only happens on the initial page load, i.e. once the page is cached, the lag is still there, but drops down to about 3 seconds. I've included a screenshot from the Firefox Performance Profiler. Since all the generated code is minified, it doesn't really provide clues toward where the bug is happening, EXCEPT: when I hover over the yellow CPU useage monitor, it points towards an Array.prototype.indexOf
call in _/nuxt/reports.{hash}.js
as a possible culprit.
I realize this is not a lot of information to go on. I'm relatively new to Nuxt and I'm just looking to see if anyone has tips towards debugging something like this. Sadly, this is only happening on our production server, and isn't reproducable in dev or staging. Thanks everyone!1 Reply
you can enable source maps to find better pointers (so you can debug it with the unminified code)
if it only happens on prod it is already quite strange.
Different data than on staging?