Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

**** ** - Using DASH Application

Hi Chris Parmer,

Good Day!!!

This is in regards to DASH application. I am using plotly dash since 2 months to create my robust automated machine learning tool with non-graphical and graphical related analysis once user upload the data and we have created our standalone application through webview.

The big problem we are facing is processing time once we upload the data into application, for KBs data took time to load exactly in seconds and for MBs taken minutes. As this application going to use our citizen data scientist(Business Analyst/Analyst), so they don’t have time to wait for seconds/minutes once we load the data into tool.

Already implemented to overcome this issue -

  1. Precalculation on main page for all other pages(config.py)
  2. Operated application on onClinked event(loading data on onClick)
  3. Tried to implement flask caching to improve processing time through multithreading.
  4. Multithreading not supported on windows OS as a 6 processes, it’s only allowing me to add only 1 processes
    at a time which is not working properly.
  5. My standalone application getting hanged in between.
  6. We are still exploring how it scales for many concurrent users.
  7. Worked on hidden div with intermediate data (as suggested by plotly).
  8. We have written separate functions for every Output which forces to restructure the code.
  9. There are some issues we may not be able to resolve without getting to know the way Dash works by heart - Caching.
  10. Sometimes port issues as well.

Requesting you to help on below points if possible-

  1. How to improve our processing time over MBs of data.
  2. Flask caching if you have anything on this.
  3. Is there any way to deploy our standalone application directly on Google Chrome instead IE. Please note i have tried to make Google chrome as default browser on my asset?
  4. Please suggest can we go ahead for making large scale application through plotly dash. I am asking this because i am facing too much issues currently in dash even after my logic were valid for that component. I am dropping this note with the final hope on python dash otherwise i need to look for other framework which i don’t want to go ahead after 1 month research and 2 months hands-on experience on dash.

Appreciate your quick help here.

Regards,


@chriddyp - Please check this issues.

Hi!

As a user and not a developer of this framework, I can give you the following suggestions:

  1. Uploading time should be inspected w.r.t. every component. I do not have uploading speed issues, at least not as you described. Maybe your IE browser is the problem? Maybe the function that handles the received data? Maybe something regarding the connectivity between the client and the server?
  2. You can use Flask for caching and it is documented: https://dash.plot.ly/performance . If you have multiple users, I recommend you to manage sessions https://dash.plot.ly/sharing-data-between-callbacks
  3. I do not understand why Chrome is an issue. Can you elaborate on that one? I deployed two Dash apps for internal uses (development branches in our company) and had no problem accessing via Chrome.
  4. I can’t honestly recommend Dash for large-scale applications. You should use a “real” framework and “real” backend - Flask with Angular/Reach/Vue works great. I decouple the UI and backend methodically, which is easier to develop and debug.

I hope I helped in some way. Good luck!

HI mrmr,

Good Day!!!

Thanks for quick response!!

  1. Uploading time should be inspected w.r.t. every component. I do not have uploading speed issues, at least not as you described. Maybe your IE browser is the problem? Maybe the function that handles the received data? Maybe something regarding the connectivity between the client and the server? - Thanks, here i am talking about how to deploy my standalone application directly on Google chrome instead IE browser. Currently i have used below code to deployed on IE -

Code on my dash main page(Index.py)-
import webview
url = “http://127.0.0.1:9040
def run_my_server():
app.run_server(port=“9040”)

if name = ‘main’:
threading.Timer(0, run_my_server).start()
webview.create_window(“Tool”, url)

Hence, please suggest for Google chrome.

  1. You can use Flask for caching and it is documented: https://dash.plot.ly/performance . If you have multiple users, I recommend you to manage sessions https://dash.plot.ly/sharing-data-between-callbacks -

Thanks, I have implemented flask caching but throwing an error on windows OS that you cannot use 6 processes at a time. Please select one process at a time. Please guide any solution you have for this.

  1. I do not understand why Chrome is an issue. Can you elaborate on that one? I deployed two Dash apps for internal uses (development branches in our company) and had no problem accessing via Chrome. -

Launching dash app on google chrome have no issues, facing issue when it is opening in IE.

  1. I can’t honestly recommend Dash for large-scale applications. You should use a “real” framework and “real” backend - Flask with Angular/Reach/Vue works great. I decouple the UI and backend methodically, which is easier to develop and debug. -

Initially we have thought to have all control on data scientist side through plotly dash instead rely on UI/UX developer or designer and so on. Here, at the end of 2 months struggle to reach at 40% work of our application in python dash we came to know it’s going to solve our problem. But as a data scientist we know we are developing tool to have something in it to solve our problem. Let see!!!

Thanks for your help again!!!

@chriddyp - Appreciate your input as well on above asked.