On 3 nov, 12:12, Low Kian Seong <django....@gmail.com> wrote: > Pretty much confirmed it's the rendering or pulling of data from database: > > 1. I tried to render a html page instead of Excel. Same speed. > So this > kicks out the theory of rending of excel is slowing the page down.
I assume you meant "csv", not "Excel" ? Anyway - the problem here is not about which text format you create *using a template system*, but with the overhead of the template system for huge datasets. Did you try generating your csv using Python's "csv" module, or even (if you don't have any quoting / newlines / whatever issues), just generating it directly as string and writing it on the HttpResponse object ? > 2. I tried shorting out all the data from the rendered page. How ? > Page came > up in less than 2 seconds. Put back all the data called from the db, > whomp! It goes back to 50 seconds. Indeed. But given your questions in this thread, I *strongly* suspect you don't really understand what you've done and jump to (very) possibly false conclusions. If you don't iterate over the queryset, the SELECT query is *not* actually sent to the database. So if that was how you "shorted out all the data", you just cannot rely on such a "test" to assert the problem is with the template... > > Now debugging the rendering of the template. Could an alternative > templating engine like jinja help this? I really don't think so. And FWIW, if you're generating csv, using a template engine is just plain overkill. My 2 cents. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---