datatools-server icon indicating copy to clipboard operation
datatools-server copied to clipboard

Return otpServers with /project endpoint to allow speedup

Open philip-cline opened this issue 2 years ago • 3 comments

Checklist

  • [x] Appropriate branch selected (all PRs must first be merged to dev before they can be merged to master)
  • [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: image

TODO: perhaps the ProjectWithOtpServers should not be a mixin anymore?

philip-cline avatar Feb 17 '23 20:02 philip-cline

@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?

br648 avatar Feb 24 '23 09:02 br648

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.

philip-cline avatar Feb 28 '23 18:02 philip-cline

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.

philip-cline avatar Mar 07 '23 15:03 philip-cline