From a7eaceb66613ceb54fc55a7fccd9d7a131a12891 Mon Sep 17 00:00:00 2001 From: "Bruce W. Herr II" Date: Thu, 16 May 2024 15:32:12 -0400 Subject: [PATCH] Improved ontology tree performance (#1257) * Improved the ontology tree by removing unused functionality that was slowing down performance. * Remove tests for removed code --- projects/ccf-eui/src/app/app.component.ts | 6 +- .../ontology-tree.component.html | 33 ++-------- .../ontology-tree.component.spec.ts | 35 ---------- .../ontology-tree/ontology-tree.component.ts | 65 ------------------- .../ontology-tree/ontology-tree.module.ts | 2 - 5 files changed, 6 insertions(+), 135 deletions(-) diff --git a/projects/ccf-eui/src/app/app.component.ts b/projects/ccf-eui/src/app/app.component.ts index 6a3dcb39a..29ad0365b 100644 --- a/projects/ccf-eui/src/app/app.component.ts +++ b/projects/ccf-eui/src/app/app.component.ts @@ -23,7 +23,7 @@ import { AppRootOverlayContainer } from './core/services/app-root-overlay/app-ro import { ThemingService } from './core/services/theming/theming.service'; import { actionAsFn } from './core/store/action-as-fn'; import { DataStateSelectors } from './core/store/data/data.selectors'; -import { DataQueryState, DataState } from './core/store/data/data.state'; +import { DataState } from './core/store/data/data.state'; import { ListResultsState } from './core/store/list-results/list-results.state'; import { SceneState } from './core/store/scene/scene.state'; import { @@ -123,9 +123,7 @@ export class AppComponent implements OnInit { } /** Emits true whenever the overlay spinner should activate. */ - readonly spinnerActive$ = this.data.queryStatus$.pipe( - map(state => state === DataQueryState.Running) - ); + readonly spinnerActive$ = this.data.state$.pipe(map((state) => state?.status !== 'Ready')); readonly loadingMessage$ = this.data.state$.pipe(map(x => x?.statusMessage)); diff --git a/projects/ccf-eui/src/app/modules/ontology-exploration/ontology-tree/ontology-tree.component.html b/projects/ccf-eui/src/app/modules/ontology-exploration/ontology-tree/ontology-tree.component.html index ec8f6eb4f..a3ead9820 100644 --- a/projects/ccf-eui/src/app/modules/ontology-exploration/ontology-tree/ontology-tree.component.html +++ b/projects/ccf-eui/src/app/modules/ontology-exploration/ontology-tree/ontology-tree.component.html @@ -3,7 +3,7 @@ -
{{ getNodeLabel(node.label) }}
@@ -11,20 +11,7 @@ - -
- -
- - -
-
- + [matTreeNodePaddingIndent]="indent">
@@ -40,21 +27,9 @@ - -
- -
- - -
-
+ [matTreeNodePaddingIndent]="indent">
-