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
Improve performance of loading bound-with titles #3543
Conversation
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.
Thanks, @maccabeelevine -- a couple of questions. Additionally, might it be worth adding test coverage for this functionality? If you haven't done that before, I can provide some tips on capturing fixtures for FOLIO driver tests.
Yup TBD |
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.
Thanks, @maccabeelevine!
Replace low-level API calls with the single call the FOLIO UI uses to get an item's boundWithTitles.
The item record passed into the getBoundWithRecords function is a brief record. Calling
GET /inventory/items/$id
returns the full item record including aboundWithParts
structure with all the instance-level data we need. This involves more calls internally on the backend but is much faster from the client perspective, reducing an O(n) operation to constant time.