On Fri, 2007-02-09 at 13:41 -0600, Derek Lee-Wo wrote: > I incorporated ReportLib to generate a PDF of the same data that I'm > trying to display on the web and the PDF gets created in about 2 > seconds as compared to the template via Django which is taking 16-18 > seconds. > > Both routines share a common method that does all the data retrieval > and manipulation before generating the output so I know the database > and SQL is not a factor. > > This is turning out to be very distressing. I'm starting to look at > other template options. I may give Cheetah a try this weekend.
It may take a couple more days to work this out. It's only been 48 hours since you posted the original problem and less than 24 hours since you posted a portion of your code that causes the problem. It is very unusual behaviour for Django; the templating code is normally very fast, but this isn't a trivial thing to work out. Anybody working on this problem (including me), has to work up the necessary wrapper code to try and replicate the problem and create some test data and hope we see the same thing. If we don't, we have to bounce it back to you to get some more information. So understand that this can take some time. I didn't have time to do that work during the week; I'm hoping I might have time this weekend, since it is a problem worth looking at and understanding. If you were able to reduce your problem to a self-contained working example, that would help a lot. How much can you remove from the template before the problem goes away (i.e. are the for-loops the only critical piece)? How small can the data set be before there is a major change (does the time taken vary proportionally to the size of the data or is there a catastrophic increase at some point)? 84 rows of data is basically nothing, so that shouldn't have any effect, but it would be interesting to check. So if you really want to learn a new templating language, obviously go for it. But it may be a reasonable option to just hang out for another couple of days and give us a chance to look at the problem and get back to you with any queries. Hard stuff sometimes takes some time to work out. Best wishes, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

