Closed hohonuuli closed 5 years ago
This has been addressed in release 0.2.9. The bulk of this work is in JdbcRepository.
I took a different tack than proposed. No views were created, I make a SQL call to get the imagedMoment/observation as an annotation, then one pass each for imagereferences, associations and, if requested, the ancillary data.
Staff are running into performance issues when opening large sets (5000-ish annotations). The JPA makes one call to get imagedmoments followed by 4 different queries for each row. This makes it too IO intensive. My plan is to add a flattened annotation view to the database that pre-joins the tables needed to represent an annotation row in a UI. This will have the same fields as an annotation with the following exceptions:
imageReferences
are attached to an annotation. The UI can lazy load the image references when a row is selected in a UI.I'll create another API endpoint with the same GET methods as the Annotation API. Only GET methods should be needed as creation/update/delete from the existing endpoints work fine.
Note that I will also need to add a db check when annosaurus starts up to see if it needs to create the views required for this endpoint.