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
refactor: Speedup /projects endpoint #2824
Conversation
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #2824 +/- ##
===========================================
+ Coverage 18.00% 87.85% +69.85%
===========================================
Files 281 242 -39
Lines 28899 23323 -5576
===========================================
+ Hits 5202 20490 +15288
+ Misses 23697 2833 -20864 ☔ View full report in Codecov by Sentry. |
@@ -29,6 +29,9 @@ final case class KnoraProjectRepoInMemory(projects: Ref[List[KnoraProject]]) | |||
} | |||
) | |||
) | |||
|
|||
override def findOntologies(project: KnoraProject): Task[List[InternalIri]] = | |||
throw new UnsupportedOperationException("not implemented (yet)") |
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.
throw new UnsupportedOperationException("not implemented (yet)") | |
throw new UnsupportedOperationException("Not yet implemented.") |
@@ -29,6 +29,9 @@ final case class KnoraProjectRepoInMemory(projects: Ref[List[KnoraProject]]) | |||
case IriIdentifier(iri) => _.id.value == iri.value | |||
}) | |||
) | |||
|
|||
override def findOntologies(project: KnoraProject): Task[List[InternalIri]] = | |||
throw new UnsupportedOperationException("not yet implemented") |
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.
throw new UnsupportedOperationException("not yet implemented") | |
throw new UnsupportedOperationException("Not yet implemented.") |
Load Ontologies from db with single query and parallelise converting
KnoraProject
toProjectADM
Pull Request Checklist
Task Description/Number
NO-TICKET
I found that loading the start page with the project overview takes very long.
This is partly due to the fact that the app is loading the projects list with
/project
which is a slow endpoint, which is also called twice during initial loading.This change speeding up the conversion of a
KnoraProject
to a richerProjectADM
by parallelising the lookup of the ontology a project is attached to. Since the cache and an actual database lookup are pretty similar I have also removed the dependency on theOntologyCache
.Basic Requirements
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Does this PR change client-test-data?