Very Very long loading time after upgrading dash from v2.0.0 to v2.5.1

The app takes extremely long time after upgrading dash.

Below is the conda environment file. The dash app is containerized, so the issue might be from a library conflict or some recent changes in dash or plotly causing this

_libgcc_mutex             0.1                        main  
_openmp_mutex             5.1                       1_gnu  
async-generator           1.10                     pypi_0    pypi
attrs                     21.2.0                   pypi_0    pypi
backcall                  0.2.0                    pypi_0    pypi
backports-entry-points-selectable 1.1.1                    pypi_0    pypi
boto                      2.49.0                   pypi_0    pypi
boto3                     1.24.7                   pypi_0    pypi
botocore                  1.27.7                   pypi_0    pypi
brotli                    1.0.9                    pypi_0    pypi
ca-certificates           2022.4.26            h06a4308_0  
certifi                   2021.10.8                pypi_0    pypi
cffi                      1.15.0                   pypi_0    pypi
cfgv                      3.3.1                    pypi_0    pypi
click                     8.0.3                    pypi_0    pypi
click-plugins             1.1.1                    pypi_0    pypi
cligj                     0.7.2                    pypi_0    pypi
coverage                  6.1.2                    pypi_0    pypi
cryptography              36.0.1                   pypi_0    pypi
dash                      2.5.1                    pypi_0    pypi
dash-bootstrap-components 1.0.0                    pypi_0    pypi
dash-core-components      2.0.0                    pypi_0    pypi
dash-daq                  0.5.0                    pypi_0    pypi
dash-html-components      2.0.0                    pypi_0    pypi
dash-table                5.0.0                    pypi_0    pypi
decorator                 5.1.0                    pypi_0    pypi
distlib                   0.3.3                    pypi_0    pypi
et-xmlfile                1.1.0                    pypi_0    pypi
filelock                  3.4.0                    pypi_0    pypi
fiona                     1.8.20                   pypi_0    pypi
flask                     2.0.0                    pypi_0    pypi
flask-compress            1.10.1                   pypi_0    pypi
geographiclib             1.52                     pypi_0    pypi
geopandas                 0.10.2                   pypi_0    pypi
geopy                     2.2.0                    pypi_0    pypi
greenlet                  1.1.2                    pypi_0    pypi
h11                       0.13.0                   pypi_0    pypi
identify                  2.3.6                    pypi_0    pypi
idna                      3.3                      pypi_0    pypi
iniconfig                 1.1.1                    pypi_0    pypi
ipdb                      0.13.4                   pypi_0    pypi
ipython                   7.12.0                   pypi_0    pypi
itsdangerous              2.0.1                    pypi_0    pypi
jedi                      0.17.2                   pypi_0    pypi
jinja2                    3.0.3                    pypi_0    pypi
jmespath                  0.10.0                   pypi_0    pypi
joblib                    1.1.0                    pypi_0    pypi
krb5                      1.19.2               hac12032_0  
ld_impl_linux-64          2.38                 h1181459_1  
libedit                   3.1.20210910         h7f8727e_0  
libffi                    3.3                  he6710b0_2  
libgcc-ng                 11.2.0               h1234567_1  
libgomp                   11.2.0               h1234567_1  
libpq                     12.9                 hc2c5182_1  
libstdcxx-ng              11.2.0               h1234567_1  
markupsafe                2.0.1                    pypi_0    pypi
mock                      4.0.1                    pypi_0    pypi
mod-wsgi                  4.9.0                    pypi_0    pypi
munch                     2.5.0                    pypi_0    pypi
ncurses                   6.3                  h7f8727e_2  
nodeenv                   1.6.0                    pypi_0    pypi
numpy                     1.21.1                   pypi_0    pypi
openpyxl                  3.0.10                   pypi_0    pypi
openssl                   1.1.1o               h7f8727e_0  
ordered-set               4.1.0                    pypi_0    pypi
outcome                   1.1.0                    pypi_0    pypi
packaging                 21.2                     pypi_0    pypi
pandas                    1.3.4                    pypi_0    pypi
parso                     0.7.1                    pypi_0    pypi
pexpect                   4.8.0                    pypi_0    pypi
pickleshare               0.7.5                    pypi_0    pypi
pip                       21.2.4           py38h06a4308_0  
platformdirs              2.4.0                    pypi_0    pypi
plotly                    5.4.0                    pypi_0    pypi
pluggy                    1.0.0                    pypi_0    pypi
pre-commit                2.15.0                   pypi_0    pypi
prompt-toolkit            3.0.22                   pypi_0    pypi
psycopg2                  2.8.6            py38h3c74f83_1  
psycopg2-binary           2.8.6                    pypi_0    pypi
ptyprocess                0.7.0                    pypi_0    pypi
py                        1.11.0                   pypi_0    pypi
pycparser                 2.21                     pypi_0    pypi
pydantic                  1.9.1                    pypi_0    pypi
pygments                  2.10.0                   pypi_0    pypi
pyopenssl                 22.0.0                   pypi_0    pypi
pyparsing                 2.4.7                    pypi_0    pypi
pyproj                    3.2.1                    pypi_0    pypi
pytest                    6.2.5                    pypi_0    pypi
pytest-cov                2.8.1                    pypi_0    pypi
python                    3.8.13               h12debd9_0  
python-dateutil           2.8.2                    pypi_0    pypi
pytz                      2021.3                   pypi_0    pypi
pyyaml                    6.0                      pypi_0    pypi
readline                  8.1.2                h7f8727e_1  
regex                     2022.6.2                 pypi_0    pypi
s3transfer                0.6.0                    pypi_0    pypi
scikit-learn              1.1.1                    pypi_0    pypi
scipy                     1.6.1                    pypi_0    pypi
selenium                  4.1.0                    pypi_0    pypi
setuptools                61.2.0           py38h06a4308_0  
shapely                   1.8.0                    pypi_0    pypi
six                       1.16.0                   pypi_0    pypi
sklearn-pandas            2.2.0                    pypi_0    pypi
sniffio                   1.2.0                    pypi_0    pypi
sortedcontainers          2.4.0                    pypi_0    pypi
sqlalchemy                1.4.37                   pypi_0    pypi
sqlite                    3.38.3               hc218d9a_0  
tenacity                  7.0.0                    pypi_0    pypi
threadpoolctl             3.1.0                    pypi_0    pypi
tk                        8.6.12               h1ccaba5_0  
toml                      0.10.2                   pypi_0    pypi
traitlets                 5.1.1                    pypi_0    pypi
trio                      0.19.0                   pypi_0    pypi
trio-websocket            0.9.2                    pypi_0    pypi
typing-extensions         4.2.0                    pypi_0    pypi
urllib3                   1.26.9                   pypi_0    pypi
virtualenv                20.10.0                  pypi_0    pypi
wcwidth                   0.2.5                    pypi_0    pypi
werkzeug                  2.0.2                    pypi_0    pypi
wget                      3.2                      pypi_0    pypi
wheel                     0.37.1             pyhd3eb1b0_0  
wsproto                   1.0.0                    pypi_0    pypi
xgboost                   1.6.1                    pypi_0    pypi
xlsxwriter                1.4.5                    pypi_0    pypi
xz                        5.2.5                h7f8727e_1  
zlib                      1.2.12               h7f8727e_2  

Not sure what the problem could be! we aren’t aware of any changes that we made that would impact performance. I’d start by profiling your code.

Thanks for your reply. It’s strange that out of several dash apps we have, only 2 had this issue. Code profiling should help there.

Hi, I have same problem, I had to downgrade to v2.0 to speed it up. If you will find anything , please share

Thanks for reporting @kilobit ! Any chance you’d be able to profile your code to see where the issue lies? Run the profiler one one version and then on the next version. My colleague Hannah just published a nice tutorial on Profiling: Profiling Dash apps with Werkzeug

We haven’t seen this on our end or among our customers so until we see some data we won’t be able to fix!

Thanks @chriddyp for the suggestion. Will check the profiling.

FYI, I have the same slowness performance after upgrading from v2.0.0 to v2.1.0 too.