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

Callback chain refactoring and performance improvements #1254

Merged
merged 100 commits into from
Jun 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
a4c699e
add typescript to toolchain
May 7, 2020
93ef392
Add StoreObserver
May 7, 2020
6955746
Add callbacks reducer
May 7, 2020
8eff2a8
Improve Store and StoreObserver typing
May 7, 2020
8d7b045
Add callback actions
May 7, 2020
0decbba
Only consider TS code inside /src
May 7, 2020
e2d9ce8
Add `Watched` state to the callbacks state machine
May 7, 2020
5c5bf59
handle duplicates, pruning, errors
May 12, 2020
a101085
- extra typing for callbacks / wildcards case
May 13, 2020
549d623
clean up pruning
May 13, 2020
c7e74ec
followForward on prop update
May 13, 2020
e9494e4
use parsedId
May 13, 2020
27044c2
fix regressions with wildcard callbacks duplicates handling
May 14, 2020
4e8bb3e
add back handling `children` prop case with wildcards
May 14, 2020
d76111e
always concat
May 14, 2020
c5778d7
followForward on callback resolution
May 14, 2020
211b48c
lint
May 14, 2020
7d72c8e
during initialization, incomplete callbacks do not prevent partial/co…
May 15, 2020
0dfc2e0
fix typo
May 15, 2020
9bc4b73
fix regression in dvcv008/009
May 15, 2020
3f16676
Expect `callback2` to be triggered on initialization despite `callbac…
May 15, 2020
c9f7214
fix clsd005 regression: clientside promise case was mishandled
May 15, 2020
d8f9b63
cbmt005: now expecting callback to be triggered at initialization eve…
May 15, 2020
cbdd277
fix regression on dvcv012: Prune circular dependencies from `requeste…
May 15, 2020
e8985c4
group callback related types in a file to that effect
May 15, 2020
84d1eb8
rdmo004: update test to reflect circular dependencies are not executed
May 15, 2020
762f55b
- revert `layout` initialization and `children` props behavior so it …
May 15, 2020
f7d3678
remove timeout
May 15, 2020
77528d1
on layout change: ignore callbacks for which inputs were excluded or …
May 15, 2020
22e1e23
fix test regressions
May 20, 2020
d14c782
drop tail, not head of duplicates
May 20, 2020
b021f38
unrelated fix for cbcx001 (the space character is a control character…
May 20, 2020
5656e18
add ts-jest/babel for jest tests
May 20, 2020
285c152
fix regression in error handling / display
May 20, 2020
4067345
Merge remote-tracking branch 'origin/dev' into state-machine
May 20, 2020
bf96924
post-merge: add back callback context for clientside callbacks
May 20, 2020
7ab1d3f
post-merge: fix server status in devtools
May 20, 2020
4b99a08
refactor observers into files
May 20, 2020
297d9cd
- add `loadingMap` to store
May 20, 2020
0621dfd
remove `pendingCallbacks` store prop
May 20, 2020
caf5ebe
remove `pendingCallbacks` in tests
May 20, 2020
1a5e3fb
add `isLoading` state to store (derived from callbacks) + use `isLoad…
May 20, 2020
5d94983
Merge remote-tracking branch 'origin/dev' into state-machine
May 20, 2020
91b0e89
update `redux_state_rqs` implementation and usage
May 20, 2020
5e44b22
ready => !isLoading
May 20, 2020
f5698b0
Rework TreeContainer (no connect + provider/consumer)
May 21, 2020
b624cd9
remove console.log
May 21, 2020
78b1a26
prevent some intermediary renders
May 22, 2020
b0f1178
fix regression on loading_state
May 22, 2020
58a99cb
- unconnect ComponentErrorBoundary
May 22, 2020
952d525
Merge branch 'dev' into state-machine
Marc-Andre-Rivet May 22, 2020
ff18d80
fix hash generation
May 22, 2020
9cbed33
Merge branch 'state-machine' of github.com:plotly/dash into state-mac…
May 22, 2020
9ccc017
remove dead code
May 22, 2020
6a4f98f
Use `false` instead of `{ is_loading: false}`
May 22, 2020
bed0523
share (id,prop) instance for all paths
May 22, 2020
1105ca6
small loadingMap observer optimizations
May 22, 2020
b61216a
improve requestedCallbacks observer comments
May 22, 2020
4e2f0b4
stringifyId for loading_state
May 22, 2020
d1ab912
update comments
May 22, 2020
00e5e6e
bump maximum concurrent callbacks to 10
May 22, 2020
5905631
Prioitize callbacks based on depth/breadth of subsequent callback chain
May 25, 2020
df854dd
fix broken `getCallbacksByInput` import
May 26, 2020
280c7b5
fix dvcv test cases (prevent infinite loop when evaluating priority)
May 26, 2020
720c350
fix loading state on target
May 26, 2020
96d4d67
optional parameter on `setProps` to force update -- this is useful if…
May 27, 2020
6c07a0d
isAppReady - fix regression on ids
May 27, 2020
854784f
fix docker versions
May 27, 2020
983258e
improve typing
May 28, 2020
9d395f0
noise
May 28, 2020
0da5810
- typo
Jun 1, 2020
ae38bf8
remove `Applied` callback state
Jun 2, 2020
32aac96
create priority hash that is sortable instead of carrying around the …
Jun 2, 2020
dde23d3
noise
Jun 2, 2020
be6ced6
tslint
Jun 2, 2020
10185dd
eofline: true
Jun 2, 2020
484a4e5
rename getLayoutCallbacks, getCallbacksInLayout
Jun 2, 2020
92fcd16
Merge branch 'dev' into state-machine
Marc-Andre-Rivet Jun 3, 2020
c93389b
circular callbacks entrypoint, callback predecessors and dropping loops
Jun 4, 2020
24d00c8
Merge branch 'state-machine' of github.com:plotly/dash into state-mac…
Jun 4, 2020
4396e7e
use resolved inputs/outputs when calculating callback readiness
Jun 5, 2020
6fa637c
optimize transition between `prioritized` and `executing`
Jun 8, 2020
0f87b63
remove `forceOnEqual`
Jun 8, 2020
00862c3
prioritized callbacks
Jun 9, 2020
783372f
handle async callbacks through an additional `blocked` state
Jun 9, 2020
ecc5d8b
more "future proof" pendingCallbacks
Jun 9, 2020
648e4a8
babel typescript preset for babel transform
Jun 9, 2020
3c782c1
ts(x?) and js(x?) extensions
Jun 9, 2020
441b653
dry
Jun 11, 2020
a5f9c31
remove comments
Jun 12, 2020
ca02d55
revert comment change
Jun 15, 2020
b8af7e3
changelog
Jun 15, 2020
55884af
Merge branch 'dev' into state-machine
Marc-Andre-Rivet Jun 15, 2020
afcdba9
- undo `redux_state_rqs` regression
Jun 15, 2020
7a837fa
Merge branch 'state-machine' of github.com:plotly/dash into state-mac…
Jun 15, 2020
4a083bb
lint
Jun 15, 2020
1a9065a
Merge branch 'dev' into state-machine
Marc-Andre-Rivet Jun 15, 2020
be36ab4
test number of callbacks triggered for wildcard `allsmaller`
Jun 15, 2020
2dc22dc
Merge branch 'state-machine' of github.com:plotly/dash into state-mac…
Jun 15, 2020
63f14af
redux_state_rqs legacy support
Jun 15, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
lint-unit-27:
<<: *lint-unit
docker:
- image: circleci/python:2.7-stretch-node-browsers
- image: circleci/python:2.7.18-stretch-node-browsers
environment:
PYLINTRC: .pylintrc
PYVERSION: python27
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
build-core-27:
<<: *build-core
docker:
- image: circleci/python:2.7-stretch-node-browsers
- image: circleci/python:2.7.18-stretch-node-browsers
environment:
PYVERSION: python27

Expand Down Expand Up @@ -172,7 +172,7 @@ jobs:
build-misc-27:
<<: *build-misc
docker:
- image: circleci/python:2.7-stretch-node-browsers
- image: circleci/python:2.7.18-stretch-node-browsers
environment:
PYVERSION: python27

Expand Down Expand Up @@ -372,7 +372,7 @@ jobs:
test-27:
<<: *test
docker:
- image: circleci/python:2.7-stretch-node-browsers
- image: circleci/python:2.7.18-stretch-node-browsers
environment:
PERCY_ENABLE: 0
PYVERSION: python27
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).

### Changed
- [#1237](https://github.com/plotly/dash/pull/1237) Closes [#920](https://github.com/plotly/dash/issues/920): Converts hot reload fetch failures into a server status indicator showing whether the latest fetch succeeded or failed. Callback fetch failures still appear as errors but have a clearer message.
- [#1254](https://github.com/plotly/dash/pull/1254) Modifies the callback chain implementation and improves performance for apps with a lot of components

### Fixed
- [#1255](https://github.com/plotly/dash/pull/1255) Hard hot reload targets only the current window, not the top - so if your app is in an iframe you will only reload the app
Expand Down
9 changes: 9 additions & 0 deletions dash-renderer/@Types/modules.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
declare module 'cookie' {
const value: {
parse: (cookie: string) => {
_csrf_token: string
}
};

export default value;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to shim third-parties that don't have TS module definitions

5 changes: 5 additions & 0 deletions dash-renderer/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
module.exports = {
presets: [
'@babel/preset-typescript',
'@babel/preset-env',
'@babel/preset-react'
],
plugins: [
'@babel/plugin-proposal-class-properties',
],
env: {
test: {
plugins: [
'@babel/plugin-proposal-class-properties',
'@babel/plugin-transform-modules-commonjs'
]
}
Expand Down
2 changes: 1 addition & 1 deletion dash-renderer/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ module.exports = {
// notifyMode: "always",

// A preset that is used as a base for Jest's configuration
// preset: null,
preset: "ts-jest/presets/js-with-babel",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For Jest to work with TS


// Run tests from one or more projects
// projects: null,
Expand Down
Loading