I’m interested in understanding what is the best practice to improve performance working in Dash when the DataFrame are not so big.
My main issue is related to flowchart considering the following:
- Dash works with independent callbacks that run in parallel, that means no time waiting for other callbacks finishing.
- But each callback involves additional time consumptions.
For example I have this part of the app related with the historical share price of a Company:
Here I have different Dash elements that works with the same information (ten years historic share prices), but all this figures implies:
- One dcc.Graph
- Five gauges with value, marks, max, min, grid ranges.
- Five range sliders with value max, min, marks.
- Six graph indicators for the deltas.
- One led with the last price.
What is the best aproach:
- Use one callback for each element to run in parallel (18 callbacks and 18 requests for the data) ?
- Put all together in one callback and update all the output at the end of the process ?
Take into account that the app has other modules that also run in parallel to those described above.
Additional minor question: have any sence to store the historical data in a dcc.Store to avoid calling the request 18 times?
Thanks in advance for your time.