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

CB-4841 fix: concurrent tree update #2539

Merged
merged 4 commits into from
Apr 12, 2024
Merged

Conversation

Wroud
Copy link
Member

@Wroud Wroud commented Apr 9, 2024

No description provided.

@Wroud Wroud requested a review from devnaumov April 9, 2024 18:32
@Wroud Wroud self-assigned this Apr 9, 2024
@Wroud Wroud requested a review from sergeyteleshev April 9, 2024 18:32
@@ -170,98 +169,96 @@ export function useElementsTree(options: IOptions): IElementsTree {
return false;
}
}
const [loadingNodes] = useState(() => observable.map(new Map<string, Promise<void>>(), { deep: false }));
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should move it to elementsTree state as observable.shallow to keep all trees tools in one place

}
return;
async loadTree(...nodes: string[]) {
await Promise.all(loadingNodes.values());
Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose we can move it a little bit down in order to preload all resources first and when all data is being fresh we can start working with upcoming tree nodes

@Wroud Wroud merged commit 8f29b67 into devel Apr 12, 2024
4 checks passed
@Wroud Wroud deleted the fix/cb-4841/concurrent-tree-update branch April 12, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants