I don't think the queryset needs to be loaded into memory. There is an iterator() method available:
https://docs.djangoproject.com/en/dev/ref/models/querysets/#iterator On Thursday, July 25, 2013 11:56:09 AM UTC+2, Aymeric Augustin wrote: > > Hi Julian, > > Thanks for the suggestion. This is an interesting idea, however, I'd like > to see evidence that the performance improvement is worth the extra > complexity before going forwards. > > > Since 1.5 we have streaming responses. What is the state of > contrib.sitemaps in this regard? I have some very large sitemaps and > experimented with making them faster a few years ago. > > And what were the results of this experiment? > > > If the do not yet stream, I think this would be a good idea to get > memory usage down. Is there anything to keep an eye on? Would it be > valuable to Django if this is looked into? > > Large sitemaps are usually generated from a queryset, and the queryset > will be loaded in memory as soon as the first item is accessed. Streaming > the sitemap won't help at this level. > > -- > Aymeric. > > -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. For more options, visit https://groups.google.com/groups/opt_out.
