-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move
useFullAssetGraphData
to use webworker too (#26385)
Similar to #26315, moves `buildGraphData` for the `useFullAssetGraphData` hook into a webworker. ## Test plan Tested using app-proxy and loading a big asset graph
- Loading branch information
Showing
4 changed files
with
105 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 14 additions & 2 deletions
16
js_modules/dagster-ui/packages/ui-core/src/asset-graph/ComputeGraphData.types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,25 @@ | ||
import {AssetNodeForGraphQueryFragment} from './types/useAssetGraphData.types'; | ||
import {AssetGraphFetchScope, AssetGraphQueryItem} from './useAssetGraphData'; | ||
|
||
export type ComputeGraphDataMessageType = { | ||
type BaseType = { | ||
id: number; | ||
flagAssetSelectionSyntax?: boolean; | ||
}; | ||
|
||
export type ComputeGraphDataMessageType = BaseType & { | ||
type: 'computeGraphData'; | ||
repoFilteredNodes?: AssetNodeForGraphQueryFragment[]; | ||
graphQueryItems?: AssetGraphQueryItem[]; | ||
opsQuery: string; | ||
kinds: AssetGraphFetchScope['kinds']; | ||
hideEdgesToNodesOutsideQuery?: boolean; | ||
flagAssetSelectionSyntax?: boolean; | ||
}; | ||
|
||
export type BuildGraphDataMessageType = BaseType & { | ||
nodes: AssetNodeForGraphQueryFragment[]; | ||
type: 'buildGraphData'; | ||
}; | ||
|
||
export type ComputeGraphDataWorkerMessageType = | ||
| ComputeGraphDataMessageType | ||
| BuildGraphDataMessageType; |
19 changes: 13 additions & 6 deletions
19
js_modules/dagster-ui/packages/ui-core/src/asset-graph/ComputeGraphData.worker.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5a5c997
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for dagit-core-storybook ready!
✅ Preview
https://dagit-core-storybook-5cv4v6g18-elementl.vercel.app
Built with commit 5a5c997.
This pull request is being automatically deployed with vercel-action