[Improvement] ResourceStorage: Add preloader for Collections #10766
+155
−12
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
This PR adds proper preloading support for IRSS Collections and their resources, plus a cache for collection→resource mappings.
Details
CollectionDBRepositoryand exposed it viagetResourceIdsForCollections()andpreload()in the repository/preloader layer.preloadCollections()to the IRSS services/preloader to batch-load all resources for a set of collection IDs.Motivation
In forum threads, each post (and draft) can have its own attachment collection. By preloading all collections of a thread page in one step, we avoid many per-resource roundtrips and significantly improve rendering performance for threads with many attachments.
We would also like to have this for ILIAS 11 & 10 if possible
FYI @mjansenDatabay
Best @fhelfer