Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plotly-1.44.3.min.js load too slow #1438

Closed
LianqingChen opened this issue Feb 19, 2019 · 1 comment
Closed

plotly-1.44.3.min.js load too slow #1438

LianqingChen opened this issue Feb 19, 2019 · 1 comment

Comments

@LianqingChen
Copy link

thanks for anyone who cares about my questions, best wishes!

problems:
1、I develop an app with dash, but everytime when I open the website the first time, it always takes about 30s to load the "plotly-1.44.3.min.js"(from the page: https://cdn.plot.ly/plotly-1.44.3.min.js).
ps:Opening the homepage of dash( https://dash.plot.ly ) takes about 1.5minutes, because it also loads the plotly-1.44.3.min.js slowly...
image

tries(but have no effect):
1、I have tried to load the "js" files from local disk with the following setting "app.css.config.serve_locally = True app.scripts.config.serve_locally = True", then it takes longer time...

attempt(but needs help):
1、How can I load the plotly-1.44.3.min.js from another place?(such as from https://unpkg.com/……because "dash_core_components.min.js" load quickly from the page https://unpkg.com/dash-core-components@0.43.1/dash_core_components/dash_core_components.min.js);
2、Or can I make a web page which as same as https://cdn.plot.ly/plotly-1.44.3.min.js; then I can load plotly-1.44.3.min.js from the new page.

best wishes!

@LianqingChen
Copy link
Author

LianqingChen commented Feb 21, 2019

I have solved the above problem...
I am very happy and anyone who has the same problem can follow the following method.
1、Modify the line
the old line:
'external_url': 'https://cdn.plot.ly/plotly-1.44.3.min.js',

which in the file (your own installation path of dash_core_components……/site-packages/dash_core_components/_init_.py) to

the new line
'external_url': 'https://cdnjs.cloudflare.com/ajax/libs/plotly.js/1.44.4/plotly.min.js',

then the page load fastly~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant