"your bottleneck is highly unlikely to be Python. Most web applications get to wait on DB access, network latency, and then browser rendering"
I second that. My experience is first look into the DB time and second browser rendering. I have thought Python was the cause for slowness many times and each time it again proved to be DB time. Also, don't run multiple selects to the database for a set of records, make it one select.
I second that. My experience is first look into the DB time and second browser rendering. I have thought Python was the cause for slowness many times and each time it again proved to be DB time. Also, don't run multiple selects to the database for a set of records, make it one select.