perf(sidebar): reduce schema tree memory usage

This commit is contained in:
miracle authored and GitHub committed 2026-07-13 22:19:59 +08:00
1 parent 8f619fb791
commit c81eda22b0
3 files changed
+249 -2

No files matched your search

@@ -579,12 +579,14 @@ async function toggle() {
const databaseObjectGroup = node.type === "group-tables" || node.type === "group-views" || node.type === "group-materialized-views" || node.type === "group-procedures" || node.type === "group-functions" || node.type === "group-sequences" || node.type === "group-packages";
if (databaseObjectGroup && connectionStore.isTreeNodeChildrenLoaded(node.id)) {
node.isExpanded = !node.isExpanded;
if (wasExpanded) connectionStore.releaseCollapsedTreeNodeChildren(node.id);
emit("node-toggled", node, wasExpanded);
return;
}
if (node.isExpanded) {
node.isExpanded = false;
connectionStore.releaseCollapsedTreeNodeChildren(node.id);
emit("node-toggled", node, wasExpanded);
return;
}