Update: version 1.16 has been released since this was posted.
Dash v1.13.3 is a minor release featuring:
- Improved performance for applications displaying a lot of components
- Upgraded Plotly.js from 1.54.1 to 1.54.3. Plotly.js is the library behind the
dcc.Graphcomponent. Many bug fixes in here including background color not updating correctly and graphs rendering too small.
- Added support for
callback_contextin clientside callbacks #1240 - Thanks to
@mrdawsonfrom the community for this patch!
window.dash_clientside.callback_context window.dash_clientside.callback_context.triggered window.dash_clientside.callback_context.inputs window.dash_clientside.callback_context.inputs_list window.dash_clientside.callback_context.states window.dash_clientside.callback_context.states_list
- Added support for
DASH_PROXYenv var to tell
app.run_serverto report the correct URL to view your app, when it’s being proxied. Throws an error if the proxy is incompatible with the host and port you’ve given the server.
cell_selectableproperty to the DataTable to allow/disallow cell selection. Use this for read-only tables. #710
- DataTable Bug Fixes:
1.13.2contained the bulk of this work but also some regressions. We waited to fix those issues before announcing the
- 📣 Dash v1.12.0 Release - Pattern-Matching Callbacks Fixes, Shape-drawing, new DataTable conditional formatting options, prevent_initial_call, and more
- 📣 Dash v1.11.0 Release - Introducing Pattern-Matching Callbacks
- 📣 Dash v1.10.0 Release - New dcc.Graph features, updated dcc.Link, React upgrade and bug fixes
- 📣 Dash v1.9.0 release - Bug fixes
- 📣 Dash v1.8.0 release - dcc.Graph updates, markdown & link support in DataTable, and more
- 📣 Dash v1.7.0 released - Async component fixes, inline clientside callbacks, and bug fixes
- 📣 Dash 1.6.0 released - dcc.Graph updates, async performance improvements, improved caching
More About the Performance Improvements
Now, render updates are O(1).
In our tests, we found that apps with 1000 components (which is easy to make with an
html.Table! Just 200 rows with 5 columns), then performance is improved from
3.4s down to
1.8s. With 5000 rows of data, from
8.4s down to
The other change we made was in how we queue up callback network requests. If many requests are made to the same callback at the same moment (e.g. imagine hovering rapidally over 10s or hundreds of points on a map), then we’ll reject some of the intermediate network requests that are queued up and whose result would ultimately be rejected by a more recent network request in the queue. A browser can only make 6 network requests to a server at any given moment, so if there are more than 6 requests being made then we’ll take the time to prune the request queue before the browser allows the next requests to be made. In apps where there are many requests being made at once, this will reduce the load to your server which will enable your server to serve more end users, faster.
This refactor lines up some interesting performance work for the future as well. If your organization is interested in performance and would like to sponsor our development, reach out to our consulting team.
Give this a release a try with
pip install dash==1.13.3
and let us know how it goes!