Repository navigation
Conversation
…batched queries Loading every published submission hydrated each publication with its chapters, formats, DOIs and contributors, and the files were queried once per format (about 60 queries per book). Read only the ids and URL paths the sitemap needs, 1000 submissions at a time.
1 task done
This was referenced Nov 13, 2026
Contributor
|
Closed in favour of #2577, which includes this commit (pkp/pkp-lib#13789). Thanks! |
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.
Fixes pkp/pkp-lib#12670 on
main.Same change as #2545 (
stable-3_5_0), which has the details and the measurements.pages/sitemap/SitemapHandler.phpis the same on both branches, and so is the code the change relies on:Collector::getIds(), the submission file Collector'sfilterByAssoc()andfilterBySubmissionIds(),Submission::getBestId()andgetLatestPublication(),Chapter::isPageEnabled(),PublicationFormatDAO::getApprovedByPublicationId()andSubmissionFile::getBestId().On
main,Submission::fromRow()already loads the publications of a batch of submissions together, but each publication still loads its chapters and formats one by one, and the files are still queried once per format, so the issue applies here too. I have not measured it onmain.Prepared with AI assistance (Claude); tested on
stable-3_5_0as described in #2545.