Re: [Django] #36732: Sitemaps with i18n=True fetch the entire queryset of items before paginating

8 views
Skip to first unread message

Django

unread,
Nov 15, 2025, 8:14:50 AMNov 15
to django-...@googlegroups.com
#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
-------------------------------------+-------------------------------------
Changes (by Jacob Walls):

* type: Bug => Cleanup/optimization

--
Ticket URL: <https://code.djangoproject.com/ticket/36732#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 15, 2025, 8:52:18 AMNov 15
to django-...@googlegroups.com
#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>

Django

unread,
Nov 17, 2025, 11:20:02 AM (13 days ago) Nov 17
to django-...@googlegroups.com
#36732: Sitemaps with i18n=True fetch the entire queryset of items before
paginating
--------------------------------------+------------------------------------
Reporter: Julien Palard | Owner: (none)
Type: Cleanup/optimization | Status: new
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
--------------------------------------+------------------------------------
Changes (by Varun Kasyap Pentamaraju):

* owner: Varun Kasyap Pentamaraju => (none)
* status: assigned => new

Comment:

Deassigned. Thanks
--
Ticket URL: <https://code.djangoproject.com/ticket/36732#comment:10>

Django

unread,
Nov 18, 2025, 2:11:38 PM (12 days ago) Nov 18
to django-...@googlegroups.com
#36732: Sitemaps with i18n=True fetch the entire queryset of items before
paginating
-------------------------------------+-------------------------------------
Reporter: Julien Palard | Owner: Augusto
Type: | Pontes
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
-------------------------------------+-------------------------------------
Changes (by Augusto Pontes):

* owner: (none) => Augusto Pontes
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/36732#comment:11>

Django

unread,
Nov 27, 2025, 3:17:15 AM (3 days ago) Nov 27
to django-...@googlegroups.com
#36732: Sitemaps with i18n=True fetch the entire queryset of items before
paginating
-------------------------------------+-------------------------------------
Reporter: Julien Palard | Owner: Augusto
Type: | Pontes
Cleanup/optimization | Status: assigned
Component: contrib.sitemaps | Version: 5.2
Severity: Normal | Resolution:
Keywords: sitemap, memory | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Augusto Pontes):

* has_patch: 0 => 1
* needs_docs: 0 => 1
* needs_tests: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/36732#comment:12>

Django

unread,
Nov 27, 2025, 3:47:22 AM (3 days ago) Nov 27
to django-...@googlegroups.com
#36732: Sitemaps with i18n=True fetch the entire queryset of items before
paginating
-------------------------------------+-------------------------------------
Reporter: Julien Palard | Owner: Augusto
Type: | Pontes
Cleanup/optimization | Status: assigned
Component: contrib.sitemaps | Version: 5.2
Severity: Normal | Resolution:
Keywords: sitemap, memory | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Augusto Pontes):

https://github.com/django/django/pull/20268
--
Ticket URL: <https://code.djangoproject.com/ticket/36732#comment:13>
Reply all
Reply to author
Forward
0 new messages