It sounds like what's lagging is the rendering - try saving the
rendered page as html, how long does Firefox/Firefox with Fasterfox
take to display that? You might also want to try with Fasterfox
disabled, some of its tweaks might be detrimental if you're querying a
server on the same machine.
Good luck!

On Apr 14, 10:28 am, Sebastian <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Ive been using Django for a while now, and there has been one page in
> my application that has been running very slowly no matter what I do.
> Im using Django 0.96.1.
>
> The page in question renders approximately 8 tables, each with about
> 50 rows.
> This does not seem like the kind of page that should take 5-7 seconds
> to load
> (timing from fasterfox).
>
> The view in question uses three raw-sql queries so I am sure there are
> no hidden
> db performance caveats as they have all been profiled and run in the
> millisecond range. I have inserted a few timing lines which yielded
> the following:
>
> The following shows the time elapsed between entering the view's
> authentication
> decorator all the way to just before my template rendering code:
>
> start auth decorator function: 2008-04-14 14:59:18.973822
> just before template render  : 2008-04-14 14:59:19.869873
>
> So thats about 1 second.
>
> The next section relates to the template rendering:
>
> source, origin = loader.find_template_source('test.html')
> time taken was: 0:00:00.004000
>
> template = loader.get_template_from_string(source, origin,
> 'test.html')
> time taken was: 0:00:00.004001
>
> template.render(context)
> time taken was: 0:00:00.248014
>
> Thats only a total of at most 2 seconds! I have no idea where the
> other 4-5 seconds could be coming from. The above samples were taken
> using the Django runtime server to dispatch my
> media files, so I can understand that it is a little slower. However,
> in our
> production environment (where we us apache (with mod_python) to handle
> media files)
> the end result is only slightly better.
>
> Can anyone think of other areas that might be taking up time?
>
> Regards,
> Sebastian
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to