The prior implementation of check_template_dependency_relationship used inline_dependencies to check the parameters of template dependencies. inline_dependencies can be slow-ish because it copies the bodies of templates (these are graphs, so they inherit the performance characteristics of the underlying store). We can compute the parameters through the dependency tree automatically without copying the graphs, which is much faster.
Some quick numbers:
loading the NREL templates library and 223p ontology went from ~35s to ~18s
running the unit tests went from ~235s to ~195s
running the integration tests went from ~214s to ~161s
Some modest improvements, but there is plenty left to do for optimization!
The prior implementation of
check_template_dependency_relationship
usedinline_dependencies
to check the parameters of template dependencies.inline_dependencies
can be slow-ish because it copies the bodies of templates (these are graphs, so they inherit the performance characteristics of the underlying store). We can compute the parameters through the dependency tree automatically without copying the graphs, which is much faster.Some quick numbers:
Some modest improvements, but there is plenty left to do for optimization!