Skip to content
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

Merged
merged 10 commits into from Apr 2, 2024

Conversation

maccabeelevine
Copy link
Member

@maccabeelevine maccabeelevine commented Mar 25, 2024

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 a boundWithParts 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.

Copy link
Member

@demiankatz demiankatz left a 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.

module/VuFind/src/VuFind/ILS/Driver/Folio.php Outdated Show resolved Hide resolved
module/VuFind/src/VuFind/ILS/Driver/Folio.php Show resolved Hide resolved
@maccabeelevine
Copy link
Member Author

Additionally, might it be worth adding test coverage for this functionality?

Yup TBD

Copy link
Member

@demiankatz demiankatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @maccabeelevine!

@demiankatz demiankatz merged commit 74ccf96 into vufind-org:dev Apr 2, 2024
7 checks passed
@maccabeelevine maccabeelevine deleted the bound-with-faster branch April 2, 2024 12:39
@demiankatz demiankatz added this to the 10.0 milestone Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants