I use mobile broadband, which means a metered connection and if I overindulge I can run out of data.
When that happens, the internet is "available" but it's either a very very throttled bandwidth or else zero bytes download.
In these circumstances, it takes about 2 1/2 minutes to open the Node-red editor on a Raspberry Pi Zero 2, compared to about 10 seconds normally.
But if I disable mobile data in the router setup, so the internet is "disconnected", startup time reverts to 10s.
I tried deleting an mqtt broker config node which connects to hivemq; no difference.
I think you will need to trace what is trying to get a response from the Internet. Possibly node-red is trying to refresh its module list? Though I would have expected that to happen asynchronously.
Otherwise it might be a DNS issue. Make sure that all of your references to Node-RED URL's are all internal references and not accidentally using an external DNS name.
It is not a DNS issue because I have a local DNS server. Any commonly requested domains will be cached. And Node-red is accessed by IP address not hostname.
I suspect it's something NR does at startup - maybe refreshing it's list of availble updates?
If the internet is not available it stops trying, but because it is available (but no bandwidth), NR hangs waiting for a reply.
Does that sound plausible?
Yes, that's what I meant about refreshing the module list.
You could start Node-RED in debug mode. More easily, use the node-red-contrib-inspector node. Then you can use the network tab of the dev tools to see what is waiting for a response.
Hmm, actually, not sure that works. Seems that restarting node-red doesn't record anything in the network tab. Event starting manually with node --inspect doesn't seem to either. Annoying.
As the delay is related to opening the editor, rather than starting Node-RED, then the browser dev tools is definitely the place to look for what network requests are being throttled.
The editor does load the community catalog to check for updates, but that should be happening in the background and should not be blocking access to the editor. But that is the most likely culprit based in your description.