#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 <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019a87c9a915-47dd1d43-89e9-41e4-925d-6001c908cc3b-000000%40eu-central-1.amazonses.com.

Reply via email to