-
Notifications
You must be signed in to change notification settings - Fork 433
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
Added support for caching embedded objects without a self link & null responses #3415
Added support for caching embedded objects without a self link & null responses #3415
Conversation
…107155_Performance-re-request-embeds-7.6
# Conflicts: # src/app/core/cache/object-cache.reducer.ts # src/app/core/cache/object-cache.service.ts
…m submissions & the item page related items & delete tab when enabled
…107155_Performance-re-request-embeds-main # Conflicts: # src/app/collection-page/collection-page.component.ts # src/app/core/breadcrumbs/item-breadcrumb.resolver.ts # src/app/core/browse/browse.service.spec.ts # src/app/core/browse/browse.service.ts # src/app/core/data/relationship-data.service.spec.ts # src/app/core/data/relationship-data.service.ts # src/app/item-page/edit-item-page/abstract-item-update/abstract-item-update.component.ts # src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.spec.ts # src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts # src/app/item-page/item.resolver.ts # src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts # src/app/shared/utils/relation-query.utils.ts
Note: #3163 should probably remain open since this PR doesn't cover everything mentioned there (search facets) |
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.
+1 I tested search, browse, item status / edit item, My DSpace, related entities / items and can verify fewer requests (many fewer requests in the case of item lists with no thumbnails) as both an unauthenticated and authenticated user. No errors or issues encountered.
The code changes look good to me too, nothing big stood out (though this +1 is more of a practical test and feedback than a thorough code review.)
Thanks @alexandrevryghem ! Looks like great progress towards improving performance and efficiency
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 @alexandrevryghem ! This looks great and works well. I can verify this has many fewer requests on all browse/search pages. I did notice however that we still have several /items/[uuid]/accessStatus
calls occurring on the MyDSpace (but those /accessStatus
calls no longer occur for the search/browse pages).
Nonetheless, this is a huge improvement, so I'll go ahead and merge it and see if it can be ported automatically to 7.x and 8.
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin dspace-7_x
git worktree add -d .worktree/backport-3415-to-dspace-7_x origin/dspace-7_x
cd .worktree/backport-3415-to-dspace-7_x
git switch --create backport-3415-to-dspace-7_x
git cherry-pick -x be6dbdec66e6caf000c966a2e1e30f3acf199458 984c9bfc2a2271e65190e02902ea0589dcfe6c4f 704cc06f1647c29fadb0ba12f93fde5d190d8a7f b709ee03000086cd52f5de9bc67d5619a64df29d |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin dspace-8_x
git worktree add -d .worktree/backport-3415-to-dspace-8_x origin/dspace-8_x
cd .worktree/backport-3415-to-dspace-8_x
git switch --create backport-3415-to-dspace-8_x
git cherry-pick -x be6dbdec66e6caf000c966a2e1e30f3acf199458 984c9bfc2a2271e65190e02902ea0589dcfe6c4f 704cc06f1647c29fadb0ba12f93fde5d190d8a7f b709ee03000086cd52f5de9bc67d5619a64df29d |
@alexandrevryghem : Would you be able to (manually) port this to both |
References
accessStatus
requests per page. DSpace#9316Description
Reduced the number of requests sent to the backend by caching embedded null objects (this will prevent unnecessary thumbnail requests). Also added support for caching embedded objects without a self-link. (Credit for this PR goes to @Atmire-Kristof)
Instructions for Reviewers
List of changes in this PR:
null
responses.self
links.accessStatus
in places where a separate request was made.Guidance for how to test/review this PR:
thumbnail
andaccessStatus
requests are made.thumbnail
andaccessStatus
requests are now cached.Checklist
main
branch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lint
npm run check-circ-deps
)package.json
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.