Opening Dash apps is slow

Hi Community,

This is a strange issue for me.

When I open a dash apps (Connect to VM or open on localhost are the same), chrome shows “connecting”.
It takes very long to open this app.
From the console I can see for example - - [02/Apr/2021 00:31:25] “GET / HTTP/1.1” 200 -
(I refreshed the page because the page looks like stucked) - - [02/Apr/2021 00:32:11] “GET / HTTP/1.1” 200 -
(It took 22 seconds for this request) - - [02/Apr/2021 00:32:33] “POST /_dash-update-component HTTP/1.1” 200 - - - [02/Apr/2021 00:32:41] “GET /_dash-layout HTTP/1.1” 200 - - - [02/Apr/2021 00:32:41] “GET /_dash-dependencies HTTP/1.1” 200 - - - [02/Apr/2021 00:32:41] “GET /assets/favicon.ico?m=1615382872.903582 HTTP/1.1” 200 - - - [02/Apr/2021 00:32:41] “POST /_dash-update-component HTTP/1.1” 200 -

Sometimes I can open this app within 1 seconds. and other person sometimes also have similar issue.

This might not a dash specific issue but could be also very valuable if this could be solved. So I posted here.
Not sure How to re-create this app with codes. I’ll post some example

My assumptions are

  • Dash? Tried different version of dash, that’s same
  • System cache? I tried to clean them but didn’t changed
  • Internet issue? I find if I change network during this process, the page got opened right after I switch vpn
  • caused by css? There are an import in css

Is there any hints? Thanks a lot! Any advice would be very helpful

Hi @stevegao

I have similar problem, if you set debug = False it go faster, also if you use prevent initial callback for the app.

Hi Eduardo, thanks a lot!

The “slow” isn’t the dash app it self but something else.

I found the root cause might be including some css url. Will keep you updated if it got solved.