-
Notifications
You must be signed in to change notification settings - Fork 18
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
feat: fix ontology tree ui performance and enabled large disease ontologies filter on catalogue #4539
Conversation
okay, this takes too long, right? |
This one blocks on reducing diseases list? Otherwise I propose we don't do this now and first create ability to deal with very large ontologies |
If the only way to get the behaviour requested by Kim is to remove items from the ontology, I don't think we should do it. Then it's indeed better to figure out a more general way to deal with large ontologies. |
In de directory onder ‘Diagnosis available’ wordt ICD-10 in alle lagen gelijk getoond, ook nog ORPHA gelijk (aparte tabblad maar alles wordt tegelijkertijd geladen) --> waarom is het sneller bij de directory? @mswertz |
this takes long due to the large tree size, this can be divided into 3 separate issues:
(5. unbalanced tree ( i a single child list contains a large percentage of the tree items, lazy does not help once this list is visible ) ) 1 and 2 can be 'fixed' pretty easy , the best way imo is to avoid having the vue/js code doing the heavy stuff ( this means lazy tree , only add visible nodes to the dom , filter in backend ) |
Indeed, the (1) and (2) were most easy. The 'find' that was what slowed it down most dramatically. In addition using 'show' instead 'if' for the invisible nodes indeed also lost some performance. Replacing it with implementation that is more like the original molgenis-components fixed that issue and I think makes it acceptable. (I think the molgenis-components implementation of the tree has another benefit which is for showing the 'partial' on the parent of the parent, but that refactoring can be done later). P.S. If we want to make it feel really snappy we could load also the hidden filter items, then the render is fast (fetch is the remaining time now). Alternatively, indeed do a partial load of only the 'roots' and then load subtrees as suggested in (4). Would require some extra backend filter options (e.g. retrieve where parent==null) and ability to delegate subtree filtering to backend (now we simply dump all subitems into the filter). |
Search in the ontology is not fast enough still. I don't understand why we copy the whole tree instead of simply annotating it with a 'visible' just as with molgenis-components. That would prevent complete reloading but simply hide elements. |
also fixed now. |
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.
why an extra file when the tree itself is a node
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.
tree state should be managed once for the whole Tree instead of per TreeNode.
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.
the state can be managed outside of the tree , the tree can render the state
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.
- the tree selection ( deselection ) is incorrect
- tests are missing
Can you be more specific? I believe the selection/deselection is correct. Can you give an example to reproduce? There were no tests before, so I cannot be bothered to add them now on this change. |
I think I found it, updating the Tree.story for easy testing. |
I updated the Tree.story |
I addressed most of the comments, just the test: would an e2e test be suitable place?
…icd10filter_resources
…enis-emx2 into feat/icd10filter_resources
Quality Gate passedIssues Measures |
closes https://github.com/molgenis/GCC/issues/818
also in parts addresses https://github.com/molgenis/GCC/issues/819 (duplicate PR)
how to test:
N.B. with #4584 we should be able to use the emitSelectedChildren=false. Should probably enable it still in this PR, but added the feature to make it possible so I can continue in the other PR
todo:
N.B. this is confusing, there can also be populationDisease. We would need to produce filter on both with an 'or'? Or shall we reduce the data model so there is only one place where this is defined? I propose on the subpopulations.