Improve performance of dashboard/works page - #7570
Open
bbpennel wants to merge 3 commits into
Open
Conversation
…tory, otherwise for wings or valkyrie/fedora it retrieves the record for every admin set when all we need is info stored in solr
Test Results 17 files ± 0 17 suites ±0 3h 29m 26s ⏱️ - 4m 15s Results for commit c75e0f5. ± Comparison against base commit 1d0e165. This pull request removes 448 and adds 452 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
…in set was just added but not indexed yet, which mostly affects tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pull list of depositable admin sets from solr rather than from repository, otherwise for wings or valkyrie/fedora it retrieves the record for every admin set when all we need is info stored in solr. Our dashboard/works page was taking 25 seconds to load in hyrax 5, which was new.
Type of change (for release notes)
notes-bugfix
Detailed Description
We observed that the dashboard/works page was taking 25 seconds to load in our QA environment after upgrading from hyrax 4 to 5, but it was only taking 1-2 seconds in our Hyrax 4 instance with identical data. We are using Wings at this point, before we start looking at migrating to Fedora 7.
It turns out that it was populating the list of admin sets by querying activefedora for each admin set, and our repository contains 30 of them. This was a new behavior in Hyrax 5, since it was now using the queryService.find_many_by_ids method, but that retrieves far more information than is needed for populating this UI component.
This PR switches to pulling the list directly from solr, which gets performance back to the Hyrax 4 level. I have the behavior change for both Wings and Valkyrie, since it looks like the Valkyrie/fedora behavior will have the same problem, but I have not tested there yet.
Changes proposed in this pull request:
@samvera/hyrax-code-reviewers