-
Notifications
You must be signed in to change notification settings - Fork 24
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
Optimize implementation of SchemaView get_classes_by_slot()
method
#281
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #281 +/- ##
==========================================
- Coverage 62.11% 62.10% -0.01%
==========================================
Files 63 63
Lines 8459 8463 +4
Branches 2169 2170 +1
==========================================
+ Hits 5254 5256 +2
Misses 2599 2599
- Partials 606 608 +2
☔ View full report in Codecov by Sentry. |
We did some profiling (coincidentally :D) of docgen and found that the linkml-runtime/linkml_runtime/utils/schemaview.py Line 1201 in 687fc53
linkml-runtime/linkml_runtime/utils/schemaview.py Line 1209 in 687fc53
|
Oh, that's very good to know, thank you for digging into this @sierra-moxon 😁 |
good sleuthing! we should definitely avoid use of deepcopy when calculating induced slots but note that induced slots may not be necessary for docgen purposes.
|
changing https://github.com/linkml/linkml/blob/598376ce7f8c11bd3cf31f0ca7e3d5c34770021a/linkml/generators/docgen/slot.md.jinja2#L26 from True to False in my custom template (and other instances in this file) took docgen on biolink down from >2 hours to just under a minute. |
see also linkml issues #1214 and #1604 |
@sujaypatil96 is this replaced by #300? |
The
get_classes_by_slot()
method in SchemaView takes an extremely long time to run on the MIxS schema and generate the Applicable Classes table on slot documentation pages because of which we are having to explore ways to optimize the runtime for theget_classes_by_slot()
method.