#36732: Sitemaps with i18n=True fetch the entire queryset of items before
paginating
-------------------------------------+-------------------------------------
Reporter: Julien Palard | Owner: Varun
Type: | Kasyap Pentamaraju
Cleanup/optimization | Status: assigned
Component: contrib.sitemaps | Version: 5.2
Severity: Normal | Resolution:
Keywords: sitemap, memory | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Julien Palard):
Thinking of while eating today, did not checked the code or tried an
implementation, but:
The `limit` being just a limit, so in cases when an URL has no translation
we could just **not** add it to the page, leaving some pages not comptely
full, but this could be OK.
It would greatly ease pagination in case get_languages_for_item is
overloaded.
The "risk" being: in a site with many languages, say 20, and a low limit,
say 100 URLs per page, but very few URLs being translated, say less than
1%, then we would give only 5 URLs per page, leaving 95 « empty spots »
for future translations. This could be considered as a bug.
--
Ticket URL: <
https://code.djangoproject.com/ticket/36732#comment:9>