datatools-server
datatools-server copied to clipboard
Return otpServers with /project endpoint to allow speedup
Checklist
- [x] Appropriate branch selected (all PRs must first be merged to
dev
before they can be merged tomaster
) - [x] Any modified or new methods or classes have helpful JavaDoc and code is thoroughly commented
- [x] The description lists all applicable issues this PR seeks to resolve
- [x] The description lists any configuration setting(s) that differ from the default settings
- [x] All tests and CI builds passing
Description
Recent front end PRs (https://github.com/ibi-group/datatools-ui/pull/895) have tried to reduce the amount of data that is unnecessarily requested by the front end. This endpoint created a conflict bc the /project and project:id differed in their return structure (specifically in returning otpServers).
Per the comment in the backend, I'm worried about performance issues with this change:
TODO: perhaps the ProjectWithOtpServers should not be a mixin anymore?
@philip-cline following on from your comment, have you noticed any performance issues with this change and is this related to your TODO? I.e. if there is a performance issue, should this update be rolled back?
Let me do some testing on a large project deployment and see. The TODO is separate from the performance issue, that is more just for if this fix is permanent, then it doesn't really make sense to keep the field as a mixin.
Yeah this seems to slow things down significantly for a big project. I'll do some work to maybe reduce the amount of data we need to request.